Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sh: fix futex FUTEX_OP_SET op on userspace addresses
Commit 00b73d8 ("sh: add working futex atomic ops on userspace addresses for smp") changed the futex_atomic_op_inuser function to use a loop. In case of the FUTEX_OP_SET op with a userspace address containing a value different of 0, this loop is an endless loop. Fix that by loading the value of oldval from the userspace before doing the cmpxchg op, also for the FUTEX_OP_SET case. Signed-off-by: Aurelien Jarno <[email protected]> Signed-off-by: Rich Felker <[email protected]>
- Loading branch information