Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions kernel/futex.c
Original file line number Diff line number Diff line change
Expand Up @@ -2448,6 +2448,16 @@ static int fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q,
* Since we just failed the trylock; there must be an owner.
*/
newowner = rt_mutex_owner(&pi_state->pi_mutex);
WARN_ON(!newowner);

/*
* pi_state is incorrect, some other task did a lock steal and
* we returned due to timeout or signal without taking the
* rt_mutex. Too late.
*/
if (!newowner)
newowner = rt_mutex_next_owner(&pi_state->pi_mutex);

BUG_ON(!newowner);
} else {
WARN_ON_ONCE(argowner != current);
Expand Down