Skip to content

Commit 7e76656

Browse files
melverpaulmckrcu
authored andcommitted
kcsan: Remove existing special atomic rules
Remove existing special atomic rules from kcsan_is_atomic_special() because they are no longer needed. Since we rely on the compiler emitting instrumentation distinguishing volatile accesses, the rules have become redundant. Let's keep kcsan_is_atomic_special() around, so that we have an obvious place to add special rules should the need arise in future. Signed-off-by: Marco Elver <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent acfa087 commit 7e76656

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

kernel/kcsan/atomic.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
#ifndef _KERNEL_KCSAN_ATOMIC_H
44
#define _KERNEL_KCSAN_ATOMIC_H
55

6-
#include <linux/jiffies.h>
7-
#include <linux/sched.h>
6+
#include <linux/types.h>
87

98
/*
109
* Special rules for certain memory where concurrent conflicting accesses are
@@ -13,8 +12,7 @@
1312
*/
1413
static bool kcsan_is_atomic_special(const volatile void *ptr)
1514
{
16-
/* volatile globals that have been observed in data races. */
17-
return ptr == &jiffies || ptr == &current->state;
15+
return false;
1816
}
1917

2018
#endif /* _KERNEL_KCSAN_ATOMIC_H */

0 commit comments

Comments
 (0)