Skip to content

Commit

Permalink
ipv6: Don't dev_hold(dev) in ip6_mc_find_dev_rcu.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
RongQing.Li authored and davem330 committed Mar 17, 2012
1 parent b8fbaef commit c577923
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/ipv6/mcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c577923

Please sign in to comment.