Thread (5 messages) 5 messages, 3 authors, 2024-08-28

Re: [PATCH] powerpc/qspinlock: Fix deadlock in MCS queue

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2024-08-28 03:52:37
Also in: lkml

"Nysal Jan K.A." [off-list ref] writes:
If an interrupt occurs in queued_spin_lock_slowpath() after we increment
qnodesp->count and before node->lock is initialized, another CPU might
see stale lock values in get_tail_qnode(). If the stale lock value happens
to match the lock on that CPU, then we write to the "next" pointer of
the wrong qnode. This causes a deadlock as the former CPU, once it becomes
the head of the MCS queue, will spin indefinitely until it's "next" pointer
is set by its successor in the queue. This results in lockups similar to
the following.
...
Thanks to Saket Kumar Bhaskar for help with recreating the issue

Fixes: 84990b169557 ("powerpc/qspinlock: add mcs queueing for contended waiters")
Cc: stable@vger.kernel.org # v6.2+
Reported-by: Geetika Moolchandani <redacted>
Reported-by: Vaishnavi Bhat <redacted>
Reported-by: Jijo Varghese <redacted>
 
Do we have links for any of these reports?

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help