[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120521170135.GA31803@redhat.com>
Date: Mon, 21 May 2012 19:01:35 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Boaz Harrosh <bharrosh@...asas.com>
Cc: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
rusty@...tcorp.com.au, akpm@...ux-foundation.org,
torvalds@...ux-foundation.org, tj@...nel.org,
linux-kernel@...r.kernel.org
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:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists