From: RongQing.Li Date: Thu, 15 Mar 2012 22:54:14 +0000 (+0000) Subject: ipv6: Don't dev_hold(dev) in ip6_mc_find_dev_rcu. X-Git-Tag: upstream/snapshot3+hdmi~7978^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c577923756b7fe9071f28a76b66b83b306d1d001;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ipv6: Don't dev_hold(dev) in ip6_mc_find_dev_rcu. 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 Acked-by: Eric Dumazet Signed-off-by: David S. Miller --- 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