]> git.baikalelectronics.ru Git - kernel.git/commit
mm: memcg: do not declare OOM from __GFP_NOFAIL allocations
authorJohannes Weiner <hannes@cmpxchg.org>
Fri, 13 Dec 2013 01:12:20 +0000 (17:12 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 13 Dec 2013 02:19:26 +0000 (18:19 -0800)
commitef5bb302f2aa7ae27dc2d260105e5f540ec89242
tree8e50e004aa354150558a637ff7a9d5d8ddab9b13
parent05a68b7ad010f0ca1e2efe40f15183f6546e2d82
mm: memcg: do not declare OOM from __GFP_NOFAIL allocations

Commit 5fd52c9a63cc ("fs: buffer: move allocation failure loop into the
allocator") started recognizing __GFP_NOFAIL in memory cgroups but
forgot to disable the OOM killer.

Any task that does not fail allocation will also not enter the OOM
completion path.  So don't declare an OOM state in this case or it'll be
leaked and the task be able to bypass the limit until the next
userspace-triggered page fault cleans up the OOM state.

Reported-by: William Dauchy <wdauchy@gmail.com>
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: David Rientjes <rientjes@google.com>
Cc: <stable@vger.kernel.org> [3.12.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c