diff options
author | Linus Torvalds | 2023-11-19 13:30:21 -0800 |
---|---|---|
committer | Linus Torvalds | 2023-11-19 13:30:21 -0800 |
commit | 2f84f8232ed3bfb772dcf30d8a0acbb8ee7ffb73 (patch) | |
tree | 73a1033144cacff17119cf1b52282ec827ff22db /kernel | |
parent | c8b3443cbde91251970893fe4d5dc465c1a76a7e (diff) | |
parent | c9bd1568d5462f4108417518ce1af7b924acfb6f (diff) |
Merge tag 'locking_urgent_for_v6.7_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull locking fix from Borislav Petkov:
- Fix a hardcoded futex flags case which lead to one robust futex test
failure
* tag 'locking_urgent_for_v6.7_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
futex: Fix hardcoded flags
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/futex/core.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/kernel/futex/core.c b/kernel/futex/core.c index 52695c59d041..dad981a865b8 100644 --- a/kernel/futex/core.c +++ b/kernel/futex/core.c @@ -700,7 +700,8 @@ retry: owner = uval & FUTEX_TID_MASK; if (pending_op && !pi && !owner) { - futex_wake(uaddr, 1, 1, FUTEX_BITSET_MATCH_ANY); + futex_wake(uaddr, FLAGS_SIZE_32 | FLAGS_SHARED, 1, + FUTEX_BITSET_MATCH_ANY); return 0; } @@ -752,8 +753,10 @@ retry: * Wake robust non-PI futexes here. The wakeup of * PI futexes happens in exit_pi_state(): */ - if (!pi && (uval & FUTEX_WAITERS)) - futex_wake(uaddr, 1, 1, FUTEX_BITSET_MATCH_ANY); + if (!pi && (uval & FUTEX_WAITERS)) { + futex_wake(uaddr, FLAGS_SIZE_32 | FLAGS_SHARED, 1, + FUTEX_BITSET_MATCH_ANY); + } return 0; } |