diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-11-01 20:08:17 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-11-01 20:08:17 +0100 |
commit | 8d99084efcc21bb4e2bc4d818f41a27768d48f6e (patch) | |
tree | 32ed540014d699d1c9b7df39a5d9f5aac02886d4 /kernel/futex.c | |
parent | Merge tag 'char-misc-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff) | |
parent | lockdep: Fix nr_unused_locks accounting (diff) | |
download | linux-8d99084efcc21bb4e2bc4d818f41a27768d48f6e.tar.xz linux-8d99084efcc21bb4e2bc4d818f41a27768d48f6e.zip |
Merge tag 'locking-urgent-2020-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull locking fixes from Thomas Gleixner:
"A couple of locking fixes:
- Fix incorrect failure injection handling in the fuxtex code
- Prevent a preemption warning in lockdep when tracking
local_irq_enable() and interrupts are already enabled
- Remove more raw_cpu_read() usage from lockdep which causes state
corruption on !X86 architectures.
- Make the nr_unused_locks accounting in lockdep correct again"
* tag 'locking-urgent-2020-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
lockdep: Fix nr_unused_locks accounting
locking/lockdep: Remove more raw_cpu_read() usage
futex: Fix incorrect should_fail_futex() handling
lockdep: Fix preemption WARN for spurious IRQ-enable
Diffstat (limited to 'kernel/futex.c')
-rw-r--r-- | kernel/futex.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/futex.c b/kernel/futex.c index be68ac0d49ad..f8614ef4ff31 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -1503,8 +1503,10 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_pi_state *pi_ */ newval = FUTEX_WAITERS | task_pid_vnr(new_owner); - if (unlikely(should_fail_futex(true))) + if (unlikely(should_fail_futex(true))) { ret = -EFAULT; + goto out_unlock; + } ret = cmpxchg_futex_value_locked(&curval, uaddr, uval, newval); if (!ret && (curval != uval)) { |