diff options
author | Oleg Nesterov <[email protected]> | 2012-03-23 15:02:50 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2012-03-23 16:58:42 -0700 |
commit | 1cc684ab75123efe7ff446eb821d44375ba8fa30 (patch) | |
tree | 165069093fc048b979ed38e537b19febdc7889d3 /tools/perf/scripts/python/syscall-counts-by-pid.py | |
parent | 3e63a93b987685f02421e18b2aa452d20553a88b (diff) |
kmod: make __request_module() killable
As Tetsuo Handa pointed out, request_module() can stress the system
while the oom-killed caller sleeps in TASK_UNINTERRUPTIBLE.
The task T uses "almost all" memory, then it does something which
triggers request_module(). Say, it can simply call sys_socket(). This
in turn needs more memory and leads to OOM. oom-killer correctly
chooses T and kills it, but this can't help because it sleeps in
TASK_UNINTERRUPTIBLE and after that oom-killer becomes "disabled" by the
TIF_MEMDIE task T.
Make __request_module() killable. The only necessary change is that
call_modprobe() should kmalloc argv and module_name, they can't live in
the stack if we use UMH_KILLABLE. This memory is freed via
call_usermodehelper_freeinfo()->cleanup.
Reported-by: Tetsuo Handa <[email protected]>
Signed-off-by: Oleg Nesterov <[email protected]>
Cc: Rusty Russell <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: 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/syscall-counts-by-pid.py')
0 files changed, 0 insertions, 0 deletions