* Oleg Nesterov <[EMAIL PROTECTED]> wrote:

> It is a bit annoying that do_exit() takes ->pi_lock to set PF_EXITING.
> All we need is to synchronize with lookup_pi_state() which saw this task
> without PF_EXITING under ->pi_lock.
> 
> Change do_exit() to use spin_unlock_wait().
> 
> Signed-off-by: Oleg Nesterov <[EMAIL PROTECTED]>

Acked-by: Ingo Molnar <[EMAIL PROTECTED]>

> -     spin_lock_irq(&tsk->pi_lock);
> -     tsk->flags |= PF_EXITING;
> -     spin_unlock_irq(&tsk->pi_lock);
> +     smp_mb();
> +     spin_unlock_wait(&tsk->pi_lock);

hm, isnt spin_unlock_wait() an SMP barrier in itself? (if not then it 
should be.)

        Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to