Re: [PATCH] - Fix memory ordering problem in wake_futex()

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

 



Manfred Spraul wrote:

Jack wrote:

On IA64, locks are released using a "st.rel" instruction. This ensures that preceding "stores" are visible before the lock is released but does NOT prevent a "store" that follows the "st.rel" from becoming visible before the "st.rel".
The result is that the task that owns the futex_q continues prematurely.
The failure I saw is the task that owned the futex_q resumed prematurely and was context-switch off of the cpu. The task's switch_stack occupied the same space of the futex_q. The store to q->lock_ptr overwrote the ar.bspstore in the
switch_stack.

I'm stupid - first I was certains that your description is wrong, I started a long mail, but the I confused myself and accepted your description.

Your description can't be correct: The store to q->lock_ptr can't overwrite ar.bspstore. As long as q->lock_ptr is not NULL, unqueue_me will spin and prevent a race. But the other race seems to be possible_ q->lock_ptr is set to NULL early, and then the spin_unlock_irqrestore() in __wake_up could overwrite ar.bspstore.

-
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