diff options
| author | Tetsuo Handa <[email protected]> | 2013-11-12 15:06:45 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2013-11-13 12:08:59 +0900 |
| commit | 786235eeba0e1e85e5cbbb9f97d1087ad03dfa21 (patch) | |
| tree | e529b2b8f6a64889ec8c385cdca64f5c1d8e1c19 /tools/perf/scripts/python | |
| parent | 10d0c9705e80bbd3d587c5fad24599aabaca6688 (diff) | |
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]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions