netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipv6: Don't dev_hold(dev) in ip6_mc_find_dev_rcu.
@ 2012-03-16  8:54 roy.qing.li
  2012-03-16 14:15 ` Eric Dumazet
  0 siblings, 1 reply; 3+ messages in thread
From: roy.qing.li @ 2012-03-16  8:54 UTC (permalink / raw)
  To: netdev

From: RongQing.Li <roy.qing.li@gmail.com>

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.

Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
---
 net/ipv6/mcast.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index b853f06..16c33e3 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -257,7 +257,6 @@ static struct inet6_dev *ip6_mc_find_dev_rcu(struct net *net,
 
 		if (rt) {
 			dev = rt->dst.dev;
-			dev_hold(dev);
 			dst_release(&rt->dst);
 		}
 	} else
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-17  4:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-16  8:54 [PATCH] ipv6: Don't dev_hold(dev) in ip6_mc_find_dev_rcu roy.qing.li
2012-03-16 14:15 ` Eric Dumazet
2012-03-17  4:57   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).