[lkml]   [2012]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] pidns: reboot_pid_ns: use SEND_SIG_FORCED instead of force_sig()
    On 04/16, Oleg Nesterov wrote:
    > I'll investigate and report tomorrow.

    Thanks again Serge, everything is clear. Afaics this needs another
    (almost off-topic) patch.

    Please forget about sys_reboot() for the moment. There is a minor
    and known problem with SIGKILL && SIGNAL_UNKILLABLE. If you send
    SIGKILL from the parent namespace to cinit, this doesn't make it
    SIGNAL_GROUP_EXIT immediately. Only after cinit actually dequeues
    SIGKILL it does do_group_exit() and set this flag. This should be
    fixed anyway, but not now.

    And this explain the problem. Note that your test-case does
    sys_reboot() from the init process, and reboot_pid_ns() does

    kill(pid_ns->child_reaper, SIGKILL);


    so it sends SIGKILL to itself and exit. This means that cinit
    (current) obviously can't dequeue SIGKILL, and without
    SIGNAL_GROUP_EXIT wait_task_zombie() ignores

    That is why the patch makes a difference.

    But why reboot_pid_ns() does do_exit? Yes, it was copied from
    sys_reboot() and I didn't notice. It should use do_group_exit(),
    and sys_reboot() too. This is the patch I am going to send, but
    I'll try to think a bit more.



     \ /
      Last update: 2012-04-17 20:37    [W:0.021 / U:13.672 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site