lkml.org 
[lkml]   [2011]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    SubjectRe: [3.1.6] Deadlock upon recursive call_usermodehelper_exec().
    From
    Date
    Additional info. I added debug printk()

    --- a/lib/kobject_uevent.c
    +++ b/lib/kobject_uevent.c
    @@ -305,8 +305,13 @@ int kobject_uevent_env(struct kobject *k
    if (retval)
    goto exit;

    + printk(KERN_INFO "*** Calling call_usermodehelper(\"%s\")\n",
    + argv[0]);
    retval = call_usermodehelper(argv[0], argv,
    env->envp, UMH_WAIT_EXEC);
    + printk(KERN_INFO
    + "*** Returned from call_usermodehelper(\"%s\")\n",
    + argv[0]);
    }

    exit:
    --- a/fs/exec.c
    +++ b/fs/exec.c
    @@ -1435,7 +1435,14 @@ int search_binary_handler(struct linux_b
    break; /* -ENOEXEC */
    if (try)
    break; /* -ENOEXEC */
    + printk(KERN_INFO
    + "*** Calling request_module(\"binfmt-%04x\")\n",
    + *(unsigned short *)(&bprm->buf[2]));
    request_module("binfmt-%04x", *(unsigned short *)(&bprm->buf[2]));
    + printk(KERN_INFO
    + "*** Returned from "
    + "request_module(\"binfmt-%04x\")\n",
    + *(unsigned short *)(&bprm->buf[2]));
    }
    #else
    break;
    and got below output just before deadlock.

    *** Calling call_usermodehelper("/sbin/hotplug")
    *** Calling request_module("binfmt-0000")
    So, this deadlock occurs when call_usermodehelper(UMH_WAIT_EXEC) is called and
    request_module() is also called from search_binary_handler() when processing
    call_usermodehelper(UMH_WAIT_EXEC).

    This would not hanppen for normal condition, but 100% happens when the
    userspace helper program is damaged.


    \
     
     \ /
      Last update: 2011-12-27 09:17    [W:0.027 / U:0.824 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site