diff options
| author | 2021-11-30 12:44:22 +0100 | |
|---|---|---|
| committer | 2021-12-09 16:42:27 -0800 | |
| commit | f948666de517cf8ebef7cb2c9b2d669dec4bfe2e (patch) | |
| tree | 2f8b8e12d5111fc08ce67245e75dee3ddb76eb3a /include/linux | |
| parent | kcsan: selftest: Add test case to check memory barrier instrumentation (diff) | |
locking/barriers, kcsan: Add instrumentation for barriers
Adds the required KCSAN instrumentation for barriers if CONFIG_SMP.
KCSAN supports modeling the effects of:
smp_mb()
smp_rmb()
smp_wmb()
smp_store_release()
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/spinlock.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index b4e5ca23f840..5c0c5174155d 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h @@ -171,7 +171,7 @@ do { \ * Architectures that can implement ACQUIRE better need to take care. */ #ifndef smp_mb__after_spinlock -#define smp_mb__after_spinlock() do { } while (0) +#define smp_mb__after_spinlock() kcsan_mb() #endif #ifdef CONFIG_DEBUG_SPINLOCK |
