Re: [PATCH] pi-futex: set PF_EXITING without taking ->pi_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* 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/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux