diff options
author | Thomas Hellström <thomas.hellstrom@linux.intel.com> | 2024-11-27 09:54:30 +0100 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2024-12-02 12:16:57 +0100 |
commit | 0302d2fd6efb0c386e521df0134eb2679a9a138f (patch) | |
tree | b2a6020ac8bc863ffe37891fb028221d72002c67 /lib | |
parent | 40384c840ea1944d7c5a392e8975ed088ecf0b37 (diff) |
locking/ww_mutex: Fix ww_mutex dummy lockdep map selftest warnings
The below commit introduces a dummy lockdep map, but didn't get
the initialization quite right (it should mimic the initialization
of the real ww_mutex lockdep maps). It also introduced a separate
locking api selftest failure. Fix these.
Closes: https://lore.kernel.org/lkml/Zw19sMtnKdyOVQoh@boqun-archlinux/
Fixes: 823a566221a5 ("locking/ww_mutex: Adjust to lockdep nest_lock requirements")
Reported-by: Boqun Feng <boqun.feng@gmail.com>
Suggested-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20241127085430.3045-1-thomas.hellstrom@linux.intel.com
Diffstat (limited to 'lib')
-rw-r--r-- | lib/locking-selftest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c index 6e0c019f71b6..ed99344317f5 100644 --- a/lib/locking-selftest.c +++ b/lib/locking-selftest.c @@ -1720,8 +1720,6 @@ static void ww_test_normal(void) { int ret; - WWAI(&t); - /* * None of the ww_mutex codepaths should be taken in the 'normal' * mutex calls. The easiest way to verify this is by using the @@ -1770,6 +1768,8 @@ static void ww_test_normal(void) ww_mutex_base_unlock(&o.base); WARN_ON(o.ctx != (void *)~0UL); + WWAI(&t); + /* nest_lock */ o.ctx = (void *)~0UL; ww_mutex_base_lock_nest_lock(&o.base, &t); |