Skip to content

Commit 5ede8ee

Browse files
KAGA-KOKOgregkh
authored andcommitted
futex: Replace pointless printk in fixup_owner()
commit 04b79c5 upstream If that unexpected case of inconsistent arguments ever happens then the futex state is left completely inconsistent and the printk is not really helpful. Replace it with a warning and make the state consistent. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ab5e9a3 commit 5ede8ee

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

‎kernel/futex.c‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2552,14 +2552,10 @@ static int fixup_owner(u32 __user *uaddr, struct futex_q *q, int locked)
25522552

25532553
/*
25542554
* Paranoia check. If we did not take the lock, then we should not be
2555-
* the owner of the rt_mutex.
2555+
* the owner of the rt_mutex. Warn and establish consistent state.
25562556
*/
2557-
if (rt_mutex_owner(&q->pi_state->pi_mutex) == current) {
2558-
printk(KERN_ERR "fixup_owner: ret = %d pi-mutex: %p "
2559-
"pi-state %p\n", ret,
2560-
q->pi_state->pi_mutex.owner,
2561-
q->pi_state->owner);
2562-
}
2557+
if (WARN_ON_ONCE(rt_mutex_owner(&q->pi_state->pi_mutex) == current))
2558+
return fixup_pi_state_owner(uaddr, q, current);
25632559

25642560
return 0;
25652561
}

0 commit comments

Comments
 (0)