lkml.org 
[lkml]   [2012]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subjectcall_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:


    \
     
     \ /
      Last update: 2012-05-21 19:41    [W:2.230 / U:0.400 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site