* [PATCH] ipv6:Fix concurrent access issue in the function inet6_rtm_deladdr
@ 2015-08-05 2:39 Nicholas Krause
2015-08-05 3:54 ` Cong Wang
0 siblings, 1 reply; 2+ messages in thread
From: Nicholas Krause @ 2015-08-05 2:39 UTC (permalink / raw)
To: davem
Cc: kuznet, jmorris, yoshfuji, kaber, netdev, linux-kernel, Nicholas Krause
From: Nicholas Krause <xerofoify@gmail.com>
This fixes the issue with conncurrent access when calling the function
inte6_addr_del due to this function using non locked wrapper versions
of certain functions by locking the routing mutex before and after this
call with rtnl_lock/unlock. After the unlocking just return the error
code as normal to signal success or failure to the caller of the function
inet_6_rtm_addr.
Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
---
net/ipv6/addrconf.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 21c2c81..b6103e0 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4006,8 +4006,11 @@ inet6_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh)
/* We ignore other flags so far. */
ifa_flags &= IFA_F_MANAGETEMPADDR;
- return inet6_addr_del(net, ifm->ifa_index, ifa_flags, pfx,
+ rtnl_lock();
+ err = inet6_addr_del(net, ifm->ifa_index, ifa_flags, pfx,
ifm->ifa_prefixlen);
+ rtnl_unlock();
+ return err;
}
static int inet6_addr_modify(struct inet6_ifaddr *ifp, u32 ifa_flags,
--
2.1.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ipv6:Fix concurrent access issue in the function inet6_rtm_deladdr
2015-08-05 2:39 [PATCH] ipv6:Fix concurrent access issue in the function inet6_rtm_deladdr Nicholas Krause
@ 2015-08-05 3:54 ` Cong Wang
0 siblings, 0 replies; 2+ messages in thread
From: Cong Wang @ 2015-08-05 3:54 UTC (permalink / raw)
To: Nicholas Krause
Cc: David Miller, Alexey Kuznetsov, James Morris, Hideaki YOSHIFUJI,
Patrick McHardy, netdev, linux-kernel, Nicholas Krause
On Tue, Aug 4, 2015 at 7:39 PM, Nicholas Krause <uboot477@gmail.com> wrote:
> From: Nicholas Krause <xerofoify@gmail.com>
>
> This fixes the issue with conncurrent access when calling the function
> inte6_addr_del due to this function using non locked wrapper versions
> of certain functions by locking the routing mutex before and after this
> call with rtnl_lock/unlock. After the unlocking just return the error
> code as normal to signal success or failure to the caller of the function
> inet_6_rtm_addr.
>
Huh? Isn't inet6_rtm_deladdr() already called with rtnl lock?
What bug are you trying to fix?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-05 3:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-05 2:39 [PATCH] ipv6:Fix concurrent access issue in the function inet6_rtm_deladdr Nicholas Krause
2015-08-05 3:54 ` Cong Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®