aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/pci_sun4v_asm.S
diff options
context:
space:
mode:
authorDarren Hart <dvhltc@us.ibm.com>2009-08-13 20:36:53 -0400
committerThomas Gleixner <tglx@linutronix.de>2009-08-16 04:59:05 -0400
commit84bc4af59081ee974dd80210e694ab59ebe51ce8 (patch)
treea07c68106814d0a748e00c75466d741d05d7e908 /arch/sparc/kernel/pci_sun4v_asm.S
parentcc6db4e60116c1f76577b6850a35ae7de69a95b6 (diff)
futex: Detect mismatched requeue targets
There is currently no check to ensure that userspace uses the same futex requeue target (uaddr2) in futex_requeue() that the waiter used in futex_wait_requeue_pi(). A mismatch here could very unexpected results as the waiter assumes it either wakes on uaddr1 or uaddr2. We could detect this on wakeup in the waiter, but the cleanup is more intense after the improper requeue has occured. This patch stores the waiter's expected requeue target in a new requeue_pi_key pointer in the futex_q which futex_requeue() checks prior to attempting to do a proxy lock acquistion or a requeue when requeue_pi=1. If they don't match, return -EINVAL from futex_requeue, aborting the requeue of any remaining waiters. Signed-off-by: Darren Hart <dvhltc@us.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: John Kacur <jkacur@redhat.com> Cc: Dinakar Guniguntala <dino@in.ibm.com> Cc: John Stultz <johnstul@us.ibm.com> LKML-Reference: <20090814003650.14634.63916.stgit@Aeon> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/sparc/kernel/pci_sun4v_asm.S')
0 files changed, 0 insertions, 0 deletions