summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/qspinlock.h
diff options
context:
space:
mode:
authorMarco Elver <elver@google.com>2021-11-30 12:44:27 +0100
committerPaul E. McKenney <paulmck@kernel.org>2021-12-09 16:42:28 -0800
commitd93414e37586691dd2684a7f8ed05fb9cd640f83 (patch)
treea07c82b559a3fcbfd1463af24c98b834e4935e94 /arch/x86/include/asm/qspinlock.h
parentcd8730c3ab4d1d651acd00b028bd949bda3f62d8 (diff)
x86/qspinlock, kcsan: Instrument barrier of pv_queued_spin_unlock()
If CONFIG_PARAVIRT_SPINLOCKS=y, queued_spin_unlock() is implemented using pv_queued_spin_unlock() which is entirely inline asm based. As such, we do not receive any KCSAN barrier instrumentation via regular atomic operations. Add the missing KCSAN barrier instrumentation for the CONFIG_PARAVIRT_SPINLOCKS case. Signed-off-by: Marco Elver <elver@google.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/qspinlock.h')
-rw-r--r--arch/x86/include/asm/qspinlock.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/qspinlock.h b/arch/x86/include/asm/qspinlock.h
index d86ab942219c..d87451df480b 100644
--- a/arch/x86/include/asm/qspinlock.h
+++ b/arch/x86/include/asm/qspinlock.h
@@ -53,6 +53,7 @@ static inline void queued_spin_lock_slowpath(struct qspinlock *lock, u32 val)
static inline void queued_spin_unlock(struct qspinlock *lock)
{
+ kcsan_release();
pv_queued_spin_unlock(lock);
}