Skip to content

Commit c76e7e0

Browse files
committed
rcu: Add KCSAN stubs to update.c
This commit adds stubs for KCSAN's data_race(), ASSERT_EXCLUSIVE_WRITER(), and ASSERT_EXCLUSIVE_ACCESS() macros to allow code using these macros to move ahead. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 3531593 commit c76e7e0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

kernel/rcu/update.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,19 @@
5151
#endif
5252
#define MODULE_PARAM_PREFIX "rcupdate."
5353

54+
#ifndef data_race
55+
#define data_race(expr) \
56+
({ \
57+
expr; \
58+
})
59+
#endif
60+
#ifndef ASSERT_EXCLUSIVE_WRITER
61+
#define ASSERT_EXCLUSIVE_WRITER(var) do { } while (0)
62+
#endif
63+
#ifndef ASSERT_EXCLUSIVE_ACCESS
64+
#define ASSERT_EXCLUSIVE_ACCESS(var) do { } while (0)
65+
#endif
66+
5467
#ifndef CONFIG_TINY_RCU
5568
module_param(rcu_expedited, int, 0);
5669
module_param(rcu_normal, int, 0);

0 commit comments

Comments
 (0)