From: Marco Elver Date: Tue, 30 Nov 2021 11:44:27 +0000 (+0100) Subject: x86/qspinlock, kcsan: Instrument barrier of pv_queued_spin_unlock() X-Git-Tag: v5.17-rc1~158^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d93414e37586691dd2684a7f8ed05fb9cd640f83;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Paul E. McKenney --- diff --git a/arch/x86/include/asm/qspinlock.h b/arch/x86/include/asm/qspinlock.h index d86ab942219c4..d87451df480bd 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); }