aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/export-to-postgresql-report
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <[email protected]>2016-04-15 14:35:39 +0200
committerThomas Gleixner <[email protected]>2016-04-20 12:33:13 +0200
commit89e9e66ba1b3bde9d8ea90566c2aee20697ad681 (patch)
tree9cd0c1ecd75e6bbf03588e0c6d9b20e3d811c86f /tools/perf/scripts/python/bin/export-to-postgresql-report
parent6687659568e2ec5b3ac24b39c5d26ce8b9d90434 (diff)
futex: Handle unlock_pi race gracefully
If userspace calls UNLOCK_PI unconditionally without trying the TID -> 0 transition in user space first then the user space value might not have the waiters bit set. This opens the following race: CPU0 CPU1 uval = get_user(futex) lock(hb) lock(hb) futex |= FUTEX_WAITERS .... unlock(hb) cmpxchg(futex, uval, newval) So the cmpxchg fails and returns -EINVAL to user space, which is wrong because the futex value is valid. To handle this (yes, yet another) corner case gracefully, check for a flag change and retry. [ tglx: Massaged changelog and slightly reworked implementation ] Fixes: ccf9e6a80d9e ("futex: Make unlock_pi more robust") Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Cc: [email protected] Cc: Davidlohr Bueso <[email protected]> Cc: Darren Hart <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-report')
0 files changed, 0 insertions, 0 deletions