|
@@ -1794,6 +1794,10 @@ rebalance:
|
|
if (p->flags & PF_MEMALLOC)
|
|
if (p->flags & PF_MEMALLOC)
|
|
goto nopage;
|
|
goto nopage;
|
|
|
|
|
|
|
|
+ /* Avoid allocations with no watermarks from looping endlessly */
|
|
|
|
+ if (test_thread_flag(TIF_MEMDIE) && !(gfp_mask & __GFP_NOFAIL))
|
|
|
|
+ goto nopage;
|
|
|
|
+
|
|
/* Try direct reclaim and then allocating */
|
|
/* Try direct reclaim and then allocating */
|
|
page = __alloc_pages_direct_reclaim(gfp_mask, order,
|
|
page = __alloc_pages_direct_reclaim(gfp_mask, order,
|
|
zonelist, high_zoneidx,
|
|
zonelist, high_zoneidx,
|