inet: RCU changes in inetdev_by_index()
Convert inetdev_by_index() to not increment in_dev refcount. Callers hold RCU or RTNL, and should not decrement in_dev refcount. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
9e917dca74
commit
8723e1b4ad
@@ -1429,8 +1429,6 @@ static struct in_device *ip_mc_find_dev(struct net *net, struct ip_mreqn *imr)
|
||||
|
||||
if (imr->imr_ifindex) {
|
||||
idev = inetdev_by_index(net, imr->imr_ifindex);
|
||||
if (idev)
|
||||
__in_dev_put(idev);
|
||||
return idev;
|
||||
}
|
||||
if (imr->imr_address.s_addr) {
|
||||
|
||||
Reference in New Issue
Block a user