Commit 2a6c8678 authored by Andrew Morton's avatar Andrew Morton Committed by Jaroslav Kysela

[PATCH] Avoid recursion in the page allocator

The PF_MEMALLOC handling got broken somewhere, and it is now possible
for a PF_MEMALLOC process to reenter page reclaim.

Change it to fail the allocation if we're PF_MEMALLOC and there are
zero pages free.
parent ee842908
...@@ -506,6 +506,7 @@ __alloc_pages(unsigned int gfp_mask, unsigned int order, ...@@ -506,6 +506,7 @@ __alloc_pages(unsigned int gfp_mask, unsigned int order,
if (page) if (page)
return page; return page;
} }
goto nopage;
} }
/* Atomic allocations - we can't balance anything */ /* Atomic allocations - we can't balance anything */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment