: NETLINK can sleep in illegal context
PATCH 1/1 : NETLINK can sleep in illegal context
Hello,
Attached patch fixes kernel panic in the NETLINK target. It's quite rare (I run this on about 100 firewalls and have seen it happen on 1 so far). Its just a GFP_KERNEL where it needs to be a GFP_ATOMIC.
*hangs head in shame at such a lame bug*
Signature · 3 lines
// Gianni Tedesco (gianni at ecsc dot co dot uk) lynx --source www.scaramanga.co.uk/gianni-at-ecsc.asc | gpg --import 8646BE7D: 6D9F 2287 870E A2C9 8F60 3A3C 91B5 7669 8646 BE7D
patch-o-matic/base/NETLINK.patch +1 -1
@@ -65,7 +65,7 @@ + skb_put(outskb, len); + memcpy(outskb->data, &nlhdr, sizeof(nlhdr)); + memcpy((outskb->data)+sizeof(nlhdr), ip, len-sizeof(nlhdr)); -+ netlink_broadcast(ipfwsk, outskb, 0, ~0, GFP_KERNEL); ++ netlink_broadcast(ipfwsk, outskb, 0, ~0, GFP_ATOMIC); + }else{ + if (net_ratelimit()) + printk(KERN_WARNING "ipt_NETLINK: packet drop due to netlink failure\n");