Messages in this thread Patch in this message | | | Date | Mon, 21 May 2012 19:01:35 +0200 | From | Oleg Nesterov <> | Subject | call_usermodehelper && check_hung_uninterruptible_tasks |
| |
(change subject, add lkml)
On 05/19, Boaz Harrosh wrote: > > On 05/19/2012 05:21 AM, Tetsuo Handa wrote: > > > By the way, when considering whether we want call_usermodehelper_timeout() > > or not, maybe we also want to consider below hung check timer topic. > > > > I noticed that a task waiting for call_usermodehelper(UMH_WAIT_PROC) to return > > is subjected to hung check timer. call_usermodehelper(UMH_WAIT_PROC) would > > normally return within few seconds, but it can take longer than > > hung_task_timeout_secs if the usermode helper is waiting for (e.g.) user's > > input. Should hung check timer warn this situation? > > > > > The fix depends on if we want to enable usermodehelper to wait for user-input ? > we will need to silence the hung check timer
tomoyo_load_policy() can use call_usermodehelper(UMH_WAIT_PROC | UMH_KILLABLE), this should also silence the hung check.
But there is another problem, wait_for_completion/wait_for_completion_killable are not freezer-friendly. Perhaps something like the patch below? Just in case, it should silence check_hung_uninterruptible_tasks() as well.
Oleg.
--- x/kernel/kmod.c +++ x/kernel/kmod.c @@ -557,7 +557,9 @@ int call_usermodehelper_exec(struct subp goto unlock; if (wait & UMH_KILLABLE) { + freezer_do_not_count(); retval = wait_for_completion_killable(&done); + freezer_count(); if (!retval) goto wait_done; @@ -567,7 +569,9 @@ int call_usermodehelper_exec(struct subp /* fallthrough, umh_complete() was already called */ } + freezer_do_not_count(); wait_for_completion(&done); + freezer_count(); wait_done: retval = sub_info->retval; out:
| |