aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/packet/af_packet.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index dac775e0bc72..ff752c606413 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1664,11 +1664,9 @@ static int packet_mc_drop(struct sock *sk, struct packet_mreq_max *mreq)
1664 if (--ml->count == 0) { 1664 if (--ml->count == 0) {
1665 struct net_device *dev; 1665 struct net_device *dev;
1666 *mlp = ml->next; 1666 *mlp = ml->next;
1667 dev = dev_get_by_index(sock_net(sk), ml->ifindex); 1667 dev = __dev_get_by_index(sock_net(sk), ml->ifindex);
1668 if (dev) { 1668 if (dev)
1669 packet_dev_mc(dev, ml, -1); 1669 packet_dev_mc(dev, ml, -1);
1670 dev_put(dev);
1671 }
1672 kfree(ml); 1670 kfree(ml);
1673 } 1671 }
1674 rtnl_unlock(); 1672 rtnl_unlock();
@@ -1692,11 +1690,9 @@ static void packet_flush_mclist(struct sock *sk)
1692 struct net_device *dev; 1690 struct net_device *dev;
1693 1691
1694 po->mclist = ml->next; 1692 po->mclist = ml->next;
1695 dev = dev_get_by_index(sock_net(sk), ml->ifindex); 1693 dev = __dev_get_by_index(sock_net(sk), ml->ifindex);
1696 if (dev != NULL) { 1694 if (dev != NULL)
1697 packet_dev_mc(dev, ml, -1); 1695 packet_dev_mc(dev, ml, -1);
1698 dev_put(dev);
1699 }
1700 kfree(ml); 1696 kfree(ml);
1701 } 1697 }
1702 rtnl_unlock(); 1698 rtnl_unlock();