mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] vmalloc might sleep
@ 2003-08-31  3:06 Matthew Wilcox
  2003-08-31  3:20 ` viro
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Wilcox @ 2003-08-31  3:06 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel


So let's whack people upside the head when they misuse it.

vmalloc-might-sleep.diff:

Index: mm/vmalloc.c
===================================================================
RCS file: /var/cvs/linux-2.6/mm/vmalloc.c,v
retrieving revision 1.2
diff -u -p -r1.2 vmalloc.c
--- a/mm/vmalloc.c	23 Aug 2003 02:47:26 -0000	1.2
+++ b/mm/vmalloc.c	31 Aug 2003 03:04:25 -0000
@@ -438,7 +438,8 @@ fail:
  */
 void *vmalloc(unsigned long size)
 {
-       return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL);
+	might_sleep();
+	return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL);
 }
 
 /**
@@ -451,6 +452,7 @@ void *vmalloc(unsigned long size)
  */
 void *vmalloc_32(unsigned long size)
 {
+	might_sleep();
 	return __vmalloc(size, GFP_KERNEL, PAGE_KERNEL);
 }
 

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-31  3:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-31  3:06 [PATCH] vmalloc might sleep Matthew Wilcox
2003-08-31  3:20 ` viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome