aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-12-04 20:23:53 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-08 13:07:24 -0500
commit941666c2e3e0f9f6a1cb5808d02352d445bd702c (patch)
tree389a773580ef22908391cc71f98982b03de62804 /include/linux/netdevice.h
parenta2d4b65d477aad1fe8c7218781a031fa9cf5abfc (diff)
net: RCU conversion of dev_getbyhwaddr() and arp_ioctl()
Le dimanche 05 décembre 2010 à 09:19 +0100, Eric Dumazet a écrit : > Hmm.. > > If somebody can explain why RTNL is held in arp_ioctl() (and therefore > in arp_req_delete()), we might first remove RTNL use in arp_ioctl() so > that your patch can be applied. > > Right now it is not good, because RTNL wont be necessarly held when you > are going to call arp_invalidate() ? While doing this analysis, I found a refcount bug in llc, I'll send a patch for net-2.6 Meanwhile, here is the patch for net-next-2.6 Your patch then can be applied after mine. Thanks [PATCH] net: RCU conversion of dev_getbyhwaddr() and arp_ioctl() dev_getbyhwaddr() was called under RTNL. Rename it to dev_getbyhwaddr_rcu() and change all its caller to now use RCU locking instead of RTNL. Change arp_ioctl() to use RCU instead of RTNL locking. Note: this fix a dev refcount bug in llc Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index a9ac5dc26e3c..d31bc3c94717 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1360,7 +1360,8 @@ static inline struct net_device *first_net_device(struct net *net)
1360 1360
1361extern int netdev_boot_setup_check(struct net_device *dev); 1361extern int netdev_boot_setup_check(struct net_device *dev);
1362extern unsigned long netdev_boot_base(const char *prefix, int unit); 1362extern unsigned long netdev_boot_base(const char *prefix, int unit);
1363extern struct net_device *dev_getbyhwaddr(struct net *net, unsigned short type, char *hwaddr); 1363extern struct net_device *dev_getbyhwaddr_rcu(struct net *net, unsigned short type,
1364 const char *hwaddr);
1364extern struct net_device *dev_getfirstbyhwtype(struct net *net, unsigned short type); 1365extern struct net_device *dev_getfirstbyhwtype(struct net *net, unsigned short type);
1365extern struct net_device *__dev_getfirstbyhwtype(struct net *net, unsigned short type); 1366extern struct net_device *__dev_getfirstbyhwtype(struct net *net, unsigned short type);
1366extern void dev_add_pack(struct packet_type *pt); 1367extern void dev_add_pack(struct packet_type *pt);