- Fix the futex PI requeue machinery to not return to userspace in
- Avoid a potential null pointer dereference in the ww_mutex deadlock check
- Other smaller cleanups and optimizations
locking/rtmutex: Fix ww_mutex deadlock check
Dan reported that rt_mutex_adjust_prio_chain() can be called with
.orig_waiter == NULL however commit a055fcc132d4 ("locking/rtmutex: Return
success on deadlock for ww_mutex waiters") unconditionally dereferences it.
Since both call-sites that have .orig_waiter == NULL don't care for the
return value, simply disable the deadlock squash by adding the NULL check.
Notably, both callers use the deadlock condition as a termination condition
for the iteration; once detected, it is sure that (de)boosting is done.
Arguably step  would be a more natural termination point, but it's
dubious whether adding a third deadlock detection state would improve the
Fixes: a055fcc132d4 ("locking/rtmutex: Return success on deadlock for ww_mutex waiters")
Reported-by: Dan Carpenter <email@example.com>
Signed-off-by: Peter Zijlstra (Intel) <firstname.lastname@example.org>
Signed-off-by: Thomas Gleixner <email@example.com>
Acked-by: Sebastian Andrzej Siewior <firstname.lastname@example.org>
1 file changed