[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20211215070151.8025-1-qiang1.zhang@intel.com>
Date: Wed, 15 Dec 2021 15:01:51 +0800
From: Zqiang <qiang1.zhang@...el.com>
To: peterz@...radead.org, tglx@...utronix.de
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] rtmutex: Fix incorrect usage of rt_mutex_waiter_is_top_waiter()
The condition for exiting spin is that the rt_mutex_waiter_is_top_waiter()
return false rather than return true.
Fixes: c3123c431447 ("locking/rtmutex: Dont dereference waiter lockless")
Signed-off-by: Zqiang <qiang1.zhang@...el.com>
---
kernel/locking/rtmutex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index 0c1f2e3f019a..8555c4efe97c 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c
@@ -1383,7 +1383,7 @@ static bool rtmutex_spin_on_owner(struct rt_mutex_base *lock,
* - the VCPU on which owner runs is preempted
*/
if (!owner_on_cpu(owner) || need_resched() ||
- rt_mutex_waiter_is_top_waiter(lock, waiter)) {
+ !rt_mutex_waiter_is_top_waiter(lock, waiter)) {
res = false;
break;
}
--
2.25.1
Powered by blists - more mailing lists