diff options
| author | Peter Zijlstra <[email protected]> | 2021-08-26 07:36:53 +0000 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2021-08-27 12:28:49 +0000 |
| commit | 6467822b8cc96e5feda98c7bf5c6329c6a896c91 (patch) | |
| tree | e48f49c0c44f69ee2ea93b98e18d17bc5ea1c17d /lib/test_stackinit.c | |
| parent | locking/rtmutex: Dequeue waiter on ww_mutex deadlock (diff) | |
| download | kernel-6467822b8cc96e5feda98c7bf5c6329c6a896c91.tar.gz kernel-6467822b8cc96e5feda98c7bf5c6329c6a896c91.zip | |
locking/rtmutex: Prevent spurious EDEADLK return caused by ww_mutexes
rtmutex based ww_mutexes can legitimately create a cycle in the lock graph
which can be observed by a blocker which didn't cause the problem:
P1: A, ww_A, ww_B
P2: ww_B, ww_A
P3: A
P3 might therefore be trapped in the ww_mutex induced cycle and run into
the lock depth limitation of rt_mutex_adjust_prio_chain() which returns
-EDEADLK to the caller.
Disable the deadlock detection walk when the chain walk observes a
ww_mutex to prevent this looping.
[ tglx: Split it apart and added changelog ]
Reported-by: Sebastian Siewior <[email protected]>
Fixes: add461325ec5 ("locking/rtmutex: Extend the rtmutex core to support ww_mutex")
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/test_stackinit.c')
0 files changed, 0 insertions, 0 deletions
