summaryrefslogtreecommitdiffstats
path: root/kernel/resource.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-11-01 17:53:58 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2008-11-01 17:53:58 +0100
commit42c0202363194007a1ac377d047a95aa39246eb0 (patch)
tree305e145fe0ee60580a127a7b72ce0d7ad582258e /kernel/resource.c
parentMerge branch 'link_removal' of git://www.jni.nu/cris (diff)
downloadlinux-42c0202363194007a1ac377d047a95aa39246eb0.tar.xz
linux-42c0202363194007a1ac377d047a95aa39246eb0.zip
reserve_region_with_split: Fix GFP_KERNEL usage under spinlock
This one apparently doesn't generate any warnings, because the function is only used during system bootup, when the warnings are disabled. But it's still very wrong. The __reserve_region_with_split() function is called with the resource_lock held for writing, so it must only ever do GFP_ATOMIC allocations. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/resource.c')
-rw-r--r--kernel/resource.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/resource.c b/kernel/resource.c
index 6aac5c60b25d..4337063663ef 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -523,7 +523,7 @@ static void __init __reserve_region_with_split(struct resource *root,
{
struct resource *parent = root;
struct resource *conflict;
- struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL);
+ struct resource *res = kzalloc(sizeof(*res), GFP_ATOMIC);
if (!res)
return;