lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210715030847.2038-1-yuzenghui@huawei.com>
Date:   Thu, 15 Jul 2021 11:08:47 +0800
From:   Zenghui Yu <yuzenghui@...wei.com>
To:     <peterz@...radead.org>, <mingo@...hat.com>, <will@...nel.org>,
        <longman@...hat.com>, <boqun.feng@...il.com>
CC:     <wanghaibin.wang@...wei.com>, <linux-kernel@...r.kernel.org>,
        Zenghui Yu <yuzenghui@...wei.com>
Subject: [PATCH] locking/qspinlock: Fix typo of lock word transition in the uncontended case

If the queue head is the only one in the queue and nobody is concurrently
setting PENDING bit, the uncontended transition should be n,0,0 -> 0,0,1.

Fix the typo.

Signed-off-by: Zenghui Yu <yuzenghui@...wei.com>
---
 kernel/locking/qspinlock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/locking/qspinlock.c b/kernel/locking/qspinlock.c
index cbff6ba53d56..591835415698 100644
--- a/kernel/locking/qspinlock.c
+++ b/kernel/locking/qspinlock.c
@@ -355,7 +355,7 @@ void queued_spin_lock_slowpath(struct qspinlock *lock, u32 val)
 	 * If we observe contention, there is a concurrent locker.
 	 *
 	 * Undo and queue; our setting of PENDING might have made the
-	 * n,0,0 -> 0,0,0 transition fail and it will now be waiting
+	 * n,0,0 -> 0,0,1 transition fail and it will now be waiting
 	 * on @next to become !NULL.
 	 */
 	if (unlikely(val & ~_Q_LOCKED_MASK)) {
-- 
2.19.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ