summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2021-08-25 13:33:14 +0300
committerPeter Zijlstra <peterz@infradead.org>2021-08-25 16:42:33 +0300
commit37e8abff2bebbf9947d6b784f5c75ed48a717089 (patch)
tree8c86061bf1bc62bf51bd51dffe7feb419031ab2a /block
parentc3123c431447da99db160264506de9897c003513 (diff)
downloadlinux-37e8abff2bebbf9947d6b784f5c75ed48a717089.tar.xz
locking/rtmutex: Dequeue waiter on ww_mutex deadlock
The rt_mutex based ww_mutex variant queues the new waiter first in the lock's rbtree before evaluating the ww_mutex specific conditions which might decide that the waiter should back out. This check and conditional exit happens before the waiter is enqueued into the PI chain. The failure handling at the call site assumes that the waiter, if it is the top most waiter on the lock, is queued in the PI chain and then proceeds to adjust the unmodified PI chain, which results in RB tree corruption. Dequeue the waiter from the lock waiter list in the ww_mutex error exit path to prevent this. Fixes: add461325ec5 ("locking/rtmutex: Extend the rtmutex core to support ww_mutex") Reported-by: Sebastian Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20210825102454.042280541@linutronix.de
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions