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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri,  9 Apr 2021 03:51:22 +0100
From:   "Matthew Wilcox (Oracle)" <willy@...radead.org>
To:     neilb@...e.de, peterz@...radead.org, mingo@...hat.com,
        will@...nel.org, longman@...hat.com, boqun.feng@...il.com,
        tglx@...utronix.de, bigeasy@...utronix.de
Cc:     "Matthew Wilcox (Oracle)" <willy@...radead.org>,
        linux-kernel@...r.kernel.org
Subject: [PATCH 08/17] gfs2: Add qd_hash_lock

Allow lockdep to track the hash bit spin locks.

Signed-off-by: Matthew Wilcox (Oracle) <willy@...radead.org>
---
 fs/gfs2/quota.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index 9b1aca7e1264..a933eb441ee9 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -80,6 +80,7 @@
 static DEFINE_SPINLOCK(qd_lock);
 struct list_lru gfs2_qd_lru;
 
+static DEFINE_SPLIT_LOCK(qd_hash_lock);
 static struct hlist_bl_head qd_hash_table[GFS2_QD_HASH_SIZE];
 
 static unsigned int gfs2_qd_hash(const struct gfs2_sbd *sdp,
@@ -95,12 +96,12 @@ static unsigned int gfs2_qd_hash(const struct gfs2_sbd *sdp,
 
 static inline void spin_lock_bucket(unsigned int hash)
 {
-        hlist_bl_lock(&qd_hash_table[hash]);
+        hlist_bl_lock(&qd_hash_table[hash], &qd_hash_lock);
 }
 
 static inline void spin_unlock_bucket(unsigned int hash)
 {
-        hlist_bl_unlock(&qd_hash_table[hash]);
+        hlist_bl_unlock(&qd_hash_table[hash], &qd_hash_lock);
 }
 
 static void gfs2_qd_dealloc(struct rcu_head *rcu)
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ