aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2007-07-24 15:02:40 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-24 15:24:59 -0400
commitb8c1c5da1520977cb55a358f20fc09567d40cad9 (patch)
treec762e6ad77297beed0978337ce2f5b0c50add739
parent01e457cfcd5b6b6f18d0bb8cec0c5d43df56557e (diff)
slab: correctly handle __GFP_ZERO
Use the correct local variable when calling into the page allocator. Local `flags' can have __GFP_ZERO set, which causes us to pass __GFP_ZERO into the page allocator, possibly from illegal contexts. The page allocator will later do prep_zero_page()->kmap_atomic(..., KM_USER0) from irq contexts and will then go BUG. Cc: Mike Galbraith <efault@gmx.de> Acked-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--mm/slab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slab.c b/mm/slab.c
index bde271c001ba..a684778b2b41 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2776,7 +2776,7 @@ static int cache_grow(struct kmem_cache *cachep,
2776 * 'nodeid'. 2776 * 'nodeid'.
2777 */ 2777 */
2778 if (!objp) 2778 if (!objp)
2779 objp = kmem_getpages(cachep, flags, nodeid); 2779 objp = kmem_getpages(cachep, local_flags, nodeid);
2780 if (!objp) 2780 if (!objp)
2781 goto failed; 2781 goto failed;
2782 2782