lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 25 Jan 2007 12:00:27 -0700 From: "Eric W. Biederman" <ebiederm@...ssion.com> To: <netdev@...r.kernel.org> Cc: <containers@...ts.osdl.org>, <openib-general@...nib.org>, "Eric W. Biederman" <ebiederm@...ssion.com> Subject: [PATCH RFC 25/31] net: Make wireless netlink event generation handle multiple network namespaces From: Eric W. Biederman <ebiederm@...ssion.com> - unquoted Signed-off-by: Eric W. Biederman <ebiederm@...ssion.com> --- net/core/wireless.c | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/net/core/wireless.c b/net/core/wireless.c index 9036359..d534617 100644 --- a/net/core/wireless.c +++ b/net/core/wireless.c @@ -1934,8 +1934,13 @@ static void wireless_nlevent_process(unsigned long data) { struct sk_buff *skb; - while ((skb = skb_dequeue(&wireless_nlevent_queue))) - rtnl_notify(skb, init_net(), 0, RTNLGRP_LINK, NULL, GFP_ATOMIC); + while ((skb = skb_dequeue(&wireless_nlevent_queue))) { + struct net_device *dev = skb->dev; + net_t net = dev->nd_net; + skb->dev = NULL; + rtnl_notify(skb, net, 0, RTNLGRP_LINK, NULL, GFP_ATOMIC); + dev_put(dev); + } } static DECLARE_TASKLET(wireless_nlevent_tasklet, wireless_nlevent_process, 0); @@ -1992,9 +1997,6 @@ static inline void rtmsg_iwinfo(struct net_device * dev, struct sk_buff *skb; int size = NLMSG_GOODSIZE; - if (!net_eq(dev->nd_net, init_net())) - return; - skb = alloc_skb(size, GFP_ATOMIC); if (!skb) return; @@ -2004,6 +2006,9 @@ static inline void rtmsg_iwinfo(struct net_device * dev, kfree_skb(skb); return; } + /* Remember the device until we are in process context */ + dev_hold(dev); + skb->dev = dev; NETLINK_CB(skb).dst_group = RTNLGRP_LINK; skb_queue_tail(&wireless_nlevent_queue, skb); tasklet_schedule(&wireless_nlevent_tasklet); -- 1.4.4.1.g278f - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists