[PATCH] vmalloc might sleep
From: Matthew Wilcox (willy_at_debian.org)
Date: 08/31/03
- Previous message: Larry McVoy: "Re: bandwidth for bkbits.net (good news)"
- Next in thread: viro_at_parcelfarce.linux.theplanet.co.uk: "Re: [PATCH] vmalloc might sleep"
- Reply: viro_at_parcelfarce.linux.theplanet.co.uk: "Re: [PATCH] vmalloc might sleep"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 31 Aug 2003 04:06:43 +0100 To: Andrew Morton <akpm@osdl.org>
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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Larry McVoy: "Re: bandwidth for bkbits.net (good news)"
- Next in thread: viro_at_parcelfarce.linux.theplanet.co.uk: "Re: [PATCH] vmalloc might sleep"
- Reply: viro_at_parcelfarce.linux.theplanet.co.uk: "Re: [PATCH] vmalloc might sleep"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- [PATCH] kbuild: fix modpost when used with O=
... Return a pointer to a static buffer. ... +get_next_line(unsigned long *pos,
void *file, unsigned long size) ... diff -Nru a/scripts/sumversion.c b/scripts/sumversion.c
... send the line "unsubscribe linux-kernel" in ... (Linux-Kernel) - [patch 1/22] Add __early_param for all arches
... files changed, 67 insertions, 2 deletionsdiff -puN include/linux/init.h~core include/linux/init.h
... * Early command line parameters. ... void; extern void softirq_init;
+/* Stuff for the command line. ... To unsubscribe from this list: send the line "unsubscribe
linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/ ... (Linux-Kernel) - [PATCH] Fix panic-at-boot
... This patch fixes a panic-at-boot when ACPI Hotplug PCI is compiled in, ... diff
-u -p -r1.1 pci_root.c ... War is real, war is primarily not about defeat or ...
send the line "unsubscribe linux-kernel" in ... (Linux-Kernel) - [PATCH 2.6.14-rc2] fix incorrect mm->hiwater_vm and mm->hiwater_rss
... diff -ru a/kernel/exit.c b/kernel/exit.c ... -void update_mem_hiwater(struct
task_struct *tsk) ... +void update_mem_hiwater ... send the line "unsubscribe
linux-kernel" in ... (Linux-Kernel) - kbuild: Fix warnings in binoffset.c
... # This is a BitKeeper generated diff -Nru style patch. ... # fix warnings
in scripts/binoffset.c ... +void search_pattern ... send the line "unsubscribe
linux-kernel" in ... (Linux-Kernel)