diff options
author | RongQing.Li <roy.qing.li@gmail.com> | 2012-03-15 22:54:14 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-23 11:20:52 -0700 |
commit | 97490c46fea06ecf95f989789e72c54fba2e2584 (patch) | |
tree | d47b5e28355cb1f68f245b1f5f2808409dbfea64 | |
parent | 137a954db947096bd9378ff5a6a77336231f4a90 (diff) | |
download | kernel_samsung_crespo-97490c46fea06ecf95f989789e72c54fba2e2584.zip kernel_samsung_crespo-97490c46fea06ecf95f989789e72c54fba2e2584.tar.gz kernel_samsung_crespo-97490c46fea06ecf95f989789e72c54fba2e2584.tar.bz2 |
ipv6: Don't dev_hold(dev) in ip6_mc_find_dev_rcu.
[ 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 <roy.qing.li@gmail.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | 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 ee7839f..2257366 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->rt6i_dev; - dev_hold(dev); dst_release(&rt->dst); } } else |