lkml.org 
[lkml]   [2007]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [BUG] futex_unlock_pi() hurts my brain and may cause application deadlock
From
Date
On Wed, 2007-05-30 at 17:49 -0700, john stultz wrote:

> ...
> retry_locked:
> /*
> * To avoid races, try to do the TID -> 0 atomic transition
> * again. If it succeeds then we can return without waking
> * anyone else up:
> */
> if (!(uval & FUTEX_OWNER_DIED)) {
> pagefault_disable();
> uval = futex_atomic_cmpxchg_inatomic(uaddr, current->pid, 0);
> pagefault_enable();
> }

My question is to all the futex gurus out there.

This code is in futex_unlock_pi. Can the owner of the mutex really die?
Isn't the owner the one doing the unlock?

-- Steve


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

\
 
 \ /
  Last update: 2007-05-31 03:33    [W:0.169 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site