]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mm,page_alloc: don't call __node_reclaim() with oom_lock held.
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Thu, 31 Aug 2017 23:15:20 +0000 (16:15 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 31 Aug 2017 23:33:14 +0000 (16:33 -0700)
commite746bf730a76fe53b82c9e6b6da72d58e9ae3565
tree5d0170fe8a0bbfbbf4940a2c452ce0f505d14ade
parent42ff72cf27027fa28dd79acabe01d9196f1480a7
mm,page_alloc: don't call __node_reclaim() with oom_lock held.

We are doing a last second memory allocation attempt before calling
out_of_memory().  But since slab shrinker functions might indirectly
wait for other thread's __GFP_DIRECT_RECLAIM && !__GFP_NORETRY memory
allocations via sleeping locks, calling slab shrinker functions from
node_reclaim() from get_page_from_freelist() with oom_lock held has
possibility of deadlock.  Therefore, make sure that last second memory
allocation attempt does not call slab shrinker functions.

Link: http://lkml.kernel.org/r/1503577106-9196-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c