diff options
author | Andrew Morton <akpm@osdl.org> | 2006-03-22 03:08:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-22 10:54:02 -0500 |
commit | 6626c5d53bc45c59798628677ba5606f02e371f3 (patch) | |
tree | 7be40e7709b1887648a649fd6b5c036638c4608b /mm/page_alloc.c | |
parent | 17cf44064ae744f081309108fa67f0e942b10167 (diff) |
[PATCH] mm: prep_zero_page() in irq is a bug
prep_zero_page() uses KM_USER0 and hence may not be used from IRQ context, at
least for highmem pages.
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Christoph Lameter <christoph@lameter.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index bdff85899638..ed91684cb1f5 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -217,6 +217,11 @@ static inline void prep_zero_page(struct page *page, int order, gfp_t gfp_flags) | |||
217 | int i; | 217 | int i; |
218 | 218 | ||
219 | BUG_ON((gfp_flags & (__GFP_WAIT | __GFP_HIGHMEM)) == __GFP_HIGHMEM); | 219 | BUG_ON((gfp_flags & (__GFP_WAIT | __GFP_HIGHMEM)) == __GFP_HIGHMEM); |
220 | /* | ||
221 | * clear_highpage() will use KM_USER0, so it's a bug to use __GFP_ZERO | ||
222 | * and __GFP_HIGHMEM from hard or soft interrupt context. | ||
223 | */ | ||
224 | BUG_ON((gfp_flags & __GFP_HIGHMEM) && in_interrupt()); | ||
220 | for (i = 0; i < (1 << order); i++) | 225 | for (i = 0; i < (1 << order); i++) |
221 | clear_highpage(page + i); | 226 | clear_highpage(page + i); |
222 | } | 227 | } |