Oleg Nesterov
1cc684ab75
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 <penguin-kernel@I-love.SAKURA.ne.jp >
Signed-off-by: Oleg Nesterov <oleg@redhat.com >
Cc: Rusty Russell <rusty@rustcorp.com.au >
Cc: Tejun Heo <tj@kernel.org >
Cc: David Rientjes <rientjes@google.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2012-03-23 16:58:42 -07:00
..
2012-03-23 09:29:44 -07:00
2012-03-20 18:11:21 -07:00
2011-07-26 16:49:45 -07:00
2012-03-21 10:27:19 -07:00
2012-03-21 10:15:51 -07:00
2012-03-21 13:25:04 -07:00
2012-03-22 20:20:18 -07:00
2012-03-21 13:36:41 -07:00
2012-01-08 12:19:57 -08:00
2012-01-13 09:32:18 +10:30
2011-07-20 14:10:11 -07:00
2011-03-14 09:15:23 -04:00
2012-03-20 21:29:40 -04:00
2012-01-17 16:16:57 -05:00
2012-01-17 16:17:01 -05:00
2012-01-23 08:44:53 -08:00
2011-03-23 19:46:28 -07:00
2012-01-17 10:19:41 -08:00
2012-02-02 09:20:22 -08:00
2012-03-22 09:04:48 -07:00
2011-10-31 19:30:05 -04:00
2011-07-25 20:57:15 -07:00
2011-09-23 12:05:29 +05:30
2012-01-08 13:10:57 -08:00
2012-03-21 17:54:59 -07:00
2011-11-06 19:44:47 -08:00
2012-02-14 10:45:42 +11:00
2011-07-14 12:59:14 +03:00
2011-10-31 09:20:12 -04:00
2012-03-23 16:58:32 -07:00
2011-05-20 08:56:56 +02:00
2012-03-23 16:58:32 -07:00
2012-03-04 23:08:54 +01:00
2011-03-23 19:47:08 -07:00
2012-03-19 17:11:15 -07:00
2011-10-31 09:20:12 -04:00
2011-11-28 08:43:52 -08:00
2012-03-05 15:49:42 -08:00
2011-10-31 09:20:12 -04:00
2011-12-15 14:56:19 +01:00
2012-02-28 20:01:08 +01:00
2011-03-25 17:52:22 -07:00
2011-04-10 17:01:05 +02:00
2011-06-10 15:15:40 +02:00
2012-01-29 20:38:29 +01:00
2011-10-31 09:20:12 -04:00
2012-03-23 16:58:42 -07:00
2012-03-05 15:49:42 -08:00
2011-10-31 09:20:13 -04:00
2011-11-23 09:28:17 -08:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2012-02-21 09:06:06 -08:00
2012-01-14 00:33:03 +01:00
2012-01-15 16:21:07 -08:00
2011-10-31 09:20:12 -04:00
2011-04-14 08:52:33 +02:00
2012-03-01 10:28:03 +01:00
2011-04-14 08:52:33 +02:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2012-03-14 17:25:56 +08:00
2012-01-12 20:13:11 -08:00
2012-02-14 11:02:15 +10:30
2012-03-23 16:58:41 -07:00
2012-02-13 20:45:38 -05:00
2011-12-15 14:56:19 +01:00
2011-10-31 09:20:12 -04:00
2012-03-20 10:31:44 -07:00
2011-10-31 09:20:12 -04:00
2012-03-23 16:58:41 -07:00
2011-10-31 09:20:11 -04:00
2012-02-21 09:06:12 -08:00
2012-02-21 09:06:03 -08:00
2012-02-21 09:03:43 -08:00
2012-02-21 09:06:13 -08:00
2012-02-21 09:06:10 -08:00
2012-02-21 09:42:30 -08:00
2012-02-21 09:06:07 -08:00
2012-02-21 15:33:34 -08:00
2012-02-21 09:06:07 -08:00
2012-02-10 09:04:49 +01:00
2012-01-22 15:08:46 -05:00
2012-02-03 23:37:07 +01:00
2011-01-27 21:13:51 -05:00
2011-12-06 08:16:49 +01:00
2011-12-14 14:54:22 -08:00
2011-12-11 10:33:18 -08:00
2011-10-31 09:20:12 -04:00
2012-01-17 16:16:55 -05:00
2011-10-31 09:20:12 -04:00
2012-03-23 16:58:41 -07:00
2011-10-31 09:20:12 -04:00
2012-03-20 10:32:09 -07:00
2011-10-31 09:20:12 -04:00
2012-02-21 09:06:08 -08:00
2011-10-31 09:20:12 -04:00
2011-11-06 19:44:47 -08:00
2011-10-31 17:30:44 -07:00
2012-03-23 16:58:32 -07:00
2011-12-20 10:25:04 -08:00
2011-08-12 16:21:35 -05:00
2012-02-14 10:45:42 +11:00
2011-09-19 17:04:37 -07:00
2011-10-31 09:20:12 -04:00
2012-01-06 07:53:34 -08:00
2012-02-24 10:05:59 +01:00
2011-12-15 14:56:19 +01:00
2011-03-23 19:47:08 -07:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-11-06 19:44:47 -08:00
2011-10-31 09:20:12 -04:00
2011-12-21 10:07:39 +01:00
2012-03-23 16:58:32 -07:00
2012-03-20 18:13:22 -07:00