[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0906121215090.30411@melkki.cs.Helsinki.FI>
Date: Fri, 12 Jun 2009 12:22:29 +0300 (EEST)
From: Pekka J Enberg <penberg@...helsinki.fi>
To: Benjamin Herrenschmidt <benh@...nel.crashing.org>
cc: linux-kernel@...r.kernel.org, npiggin@...e.de, mingo@...e.hu
Subject: [PATCH] powerpc: don't pass GFP_WAIT to kmalloc() from *_maybe_bootmem()
From: Pekka Enberg <penberg@...helsinki.fi>
As slab is initialized much earlier now, we must not pass GFP_WAIT to kmalloc()
from *_maybe_bootmem() functions; otherwise slab allocators will enable
interrupts.
Signed-off-by: Pekka Enberg <penberg@...helsinki.fi>
---
Ben, while we're discussing the slab side of things, can we go ahead and
merge this one? It should fix plenty of cases for powerpc.
arch/powerpc/lib/alloc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/lib/alloc.c b/arch/powerpc/lib/alloc.c
index f53e09c..56b35e3 100644
--- a/arch/powerpc/lib/alloc.c
+++ b/arch/powerpc/lib/alloc.c
@@ -9,7 +9,7 @@
void * __init_refok alloc_maybe_bootmem(size_t size, gfp_t mask)
{
if (mem_init_done)
- return kmalloc(size, mask);
+ return kmalloc(size, mask & ~__GFP_WAIT);
else
return alloc_bootmem(size);
}
@@ -19,7 +19,7 @@ void * __init_refok zalloc_maybe_bootmem(size_t size, gfp_t mask)
void *p;
if (mem_init_done)
- p = kzalloc(size, mask);
+ p = kzalloc(size, mask & ~__GFP_WAIT);
else {
p = alloc_bootmem(size);
if (p)
--
1.6.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists