Thread (9 messages) 9 messages, 1 author, 2012-03-21

[ 6/8] ipv6: Dont dev_hold(dev) in ip6_mc_find_dev_rcu.

From: Greg KH <gregkh@linuxfoundation.org>
Date: 2012-03-21 21:16:50
Also in: lkml

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------


From: RongQing.Li <redacted>

[ Upstream commit c577923756b7fe9071f28a76b66b83b306d1d001 ]

ip6_mc_find_dev_rcu() is called with rcu_read_lock(), so don't
need to dev_hold().
With dev_hold(), not corresponding dev_put(), will lead to leak.

[ bug introduced in 96b52e61be1 (ipv6: mcast: RCU conversions) ]

Signed-off-by: RongQing.Li <redacted>
Acked-by: Eric Dumazet <redacted>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/ipv6/mcast.c |    1 -
 1 file changed, 1 deletion(-)
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -257,7 +257,6 @@ static struct inet6_dev *ip6_mc_find_dev
 
 		if (rt) {
 			dev = rt->rt6i_dev;
-			dev_hold(dev);
 			dst_release(&rt->dst);
 		}
 	} else

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help