]> git.baikalelectronics.ru Git - kernel.git/commit
oom: stop allocating user memory if TIF_MEMDIE is set
authorEthan Solomita <solo@google.com>
Mon, 16 Jul 2007 06:38:16 +0000 (23:38 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 16 Jul 2007 16:05:36 +0000 (09:05 -0700)
commitcf1fac6abb56bdfa203ac7924c0b77314de32fef
treebf648899ba65f9eb000e9c8163a61c1cb1be9bfe
parent058727cb3212a9d8e28fe18c6428adae665fe94b
oom: stop allocating user memory if TIF_MEMDIE is set

get_user_pages() can try to allocate a nearly unlimited amount of memory on
behalf of a user process, even if that process has been OOM killed.  The
OOM kill occurs upon return to user space via a SIGKILL, but
get_user_pages() will try allocate all its memory before returning.  Change
get_user_pages() to check for TIF_MEMDIE, and if set then return
immediately.

Signed-off-by: Ethan Solomita <solo@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory.c