Skip to content
Browse files

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 96b52e6 (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>
  • Loading branch information...
1 parent b8fbaef commit c577923756b7fe9071f28a76b66b83b306d1d001 RongQing.Li committed with davem330 Mar 15, 2012
Showing with 0 additions and 1 deletion.
  1. +0 −1 net/ipv6/mcast.c
View
1 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

0 comments on commit c577923

Please sign in to comment.
Something went wrong with that request. Please try again.