[lkml]   [2006]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFC][PATCH] ->signal->tty locking
    On 10/17, Peter Zijlstra wrote:
    > On Tue, 2006-10-17 at 12:10 +0400, Oleg Nesterov wrote:
    > >
    > > We don't need lock_task_sighand() here, we can use spin_lock_irq(->siglock).
    > >
    > > We are holding tasklist_lock. This means that all tasks found by
    > > do_each_task_pid() have a valid ->signal/->sighand != NULL.
    > > tasklist_lock protects against release_task()->__exit_signal() and
    > > from changing ->sighand by de_thread().
    > I think sys_unshare() spoils the game here; it changes ->sighand in
    > midair without holding tasklist_lock. So any ->sighand but current's is
    > fair game.
    > Hmm, either sys_unshare() is broken in that it doesn't take the
    > tasklist_lock or a lot of other code is broken.

    Yes, it is broken, please look at

    I sent a patch,

    but it was ignored. Probably I should re-send it.

    > Right, use tty_mutex when using the tty, use ->sighand when changing
    > signal->tty.

    I think that things like do_task_stat()/do_acct_process() do not need
    global tty_mutex, they can use ->siglock.


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-10-17 14:33    [W:0.023 / U:72.468 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site