]> git.baikalelectronics.ru Git - kernel.git/commit
locking/rtmutex: Fix incorrect condition in rtmutex_spin_on_owner()
authorZqiang <qiang1.zhang@intel.com>
Fri, 17 Dec 2021 07:42:07 +0000 (15:42 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 18 Dec 2021 09:55:51 +0000 (10:55 +0100)
commita95d7eea614d90b236d9f646b8e7fcfbb15c8743
tree08effe7cabd24285cd4a31c5d7dff81a76317f92
parentf4faf532b51b095af557f2b8dce62f42101c8b01
locking/rtmutex: Fix incorrect condition in rtmutex_spin_on_owner()

Optimistic spinning needs to be terminated when the spinning waiter is not
longer the top waiter on the lock, but the condition is negated. It
terminates if the waiter is the top waiter, which is defeating the whole
purpose.

Fixes: 6188a54ffbec ("locking/rtmutex: Dont dereference waiter lockless")
Signed-off-by: Zqiang <qiang1.zhang@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20211217074207.77425-1-qiang1.zhang@intel.com
kernel/locking/rtmutex.c