DORMANTno replies

[PATCH] Re: Sleeping function called from illegal context at slab.c:1378 [2.2.22 fix]

From: James Morris <hidden>
Date: 2002-10-13 01:33:36

On Mon, 23 Sep 2002, Andrew Morton wrote:
quoted
That's a bug in ip_fw_ctl().  It's calling convert_ipfw()
inside FWC_WRITE_LOCK_IRQ(&ip_fw_lock, flags);

But convert_ipfw() does kmalloc(GFP_KERNEL).
Hi Alan,

This is the fix for 2.2.22, please apply.


- James
-- 
James Morris
[off-list ref]


diff -urN -X dontdiff linux-2.2.22.orig/net/ipv4/ip_fw.c linux-2.2.22.w1/net/ipv4/ip_fw.c
--- linux-2.2.22.orig/net/ipv4/ip_fw.c	Wed Sep 25 00:06:26 2002
+++ linux-2.2.22.w1/net/ipv4/ip_fw.c	Wed Sep 25 00:20:42 2002
@@ -1274,7 +1274,7 @@
 		return NULL;
 	}
 
-	fwkern = kmalloc(SIZEOF_STRUCT_IP_FW_KERNEL, GFP_KERNEL);
+	fwkern = kmalloc(SIZEOF_STRUCT_IP_FW_KERNEL, GFP_ATOMIC);
 	if (!fwkern) {
 		duprintf("convert_ipfw: kmalloc failed!\n");
 		*errno = ENOMEM;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help