Skip to contentSkip to conversation

uml: fixup allocation in the ubd driver

PATCH New Peter Zijlstra 1 participant 1 message May 1, 2007 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 uml: fixup allocation in the ubd driver

I needed this for 2.6.21-rc7-mm2, ubd was complaining about sleeping in an atomic context.
---

Sanitise gfp flags; it actually is an atomic context, so drop the GFP_KERNEL part.

---
 arch/um/drivers/ubd_kern.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/um/drivers/ubd_kern.c +1 -1
Index: linux-2.6/arch/um/drivers/ubd_kern.c
===================================================================
@@ -1102,7 +1102,7 @@ static void do_ubd_request(request_queue
 			struct scatterlist *sg = &dev->sg[dev->start_sg];
 
 			io_req = kmalloc(sizeof(struct io_thread_req),
-					 GFP_KERNEL | GFP_ATOMIC);
+					 GFP_ATOMIC);
 			if(io_req == NULL){
 				if(list_empty(&dev->restart))
 					list_add(&dev->restart, &restart);