]> Git Repo - linux.git/commit
kthread: make kthread_create() killable
authorTetsuo Handa <[email protected]>
Tue, 12 Nov 2013 23:06:45 +0000 (15:06 -0800)
committerLinus Torvalds <[email protected]>
Wed, 13 Nov 2013 03:08:59 +0000 (12:08 +0900)
commit786235eeba0e1e85e5cbbb9f97d1087ad03dfa21
treee529b2b8f6a64889ec8c385cdca64f5c1d8e1c19
parent10d0c9705e80bbd3d587c5fad24599aabaca6688
kthread: make kthread_create() killable

Any user process callers of wait_for_completion() except global init
process might be chosen by the OOM killer while waiting for completion()
call by some other process which does memory allocation.  See
CVE-2012-4398 "kernel: request_module() OOM local DoS" can happen.

When such users are chosen by the OOM killer when they are waiting for
completion() in TASK_UNINTERRUPTIBLE, the system will be kept stressed
due to memory starvation because the OOM killer cannot kill such users.

kthread_create() is one of such users and this patch fixes the problem
for kthreadd by making kthread_create() killable - the same approach
used for fixing CVE-2012-4398.

Signed-off-by: Tetsuo Handa <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Acked-by: David Rientjes <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/kthread.c
This page took 0.054464 seconds and 4 git commands to generate.