Skip to content

Commit 2f84f82

Browse files
committed
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
2 parents c8b3443 + c9bd156 commit 2f84f82

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

kernel/futex/core.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,8 @@ static int handle_futex_death(u32 __user *uaddr, struct task_struct *curr,
700700
owner = uval & FUTEX_TID_MASK;
701701

702702
if (pending_op && !pi && !owner) {
703-
futex_wake(uaddr, 1, 1, FUTEX_BITSET_MATCH_ANY);
703+
futex_wake(uaddr, FLAGS_SIZE_32 | FLAGS_SHARED, 1,
704+
FUTEX_BITSET_MATCH_ANY);
704705
return 0;
705706
}
706707

@@ -752,8 +753,10 @@ static int handle_futex_death(u32 __user *uaddr, struct task_struct *curr,
752753
* Wake robust non-PI futexes here. The wakeup of
753754
* PI futexes happens in exit_pi_state():
754755
*/
755-
if (!pi && (uval & FUTEX_WAITERS))
756-
futex_wake(uaddr, 1, 1, FUTEX_BITSET_MATCH_ANY);
756+
if (!pi && (uval & FUTEX_WAITERS)) {
757+
futex_wake(uaddr, FLAGS_SIZE_32 | FLAGS_SHARED, 1,
758+
FUTEX_BITSET_MATCH_ANY);
759+
}
757760

758761
return 0;
759762
}

0 commit comments

Comments
 (0)