History

rcu: Mark lockless ->qsmask read in rcu_check_boost_fail()

Accesses to ->qsmask are normally protected by ->lock, but there is an exception in the diagnostic code in rcu_check_boost_fail(). This commit therefore applies data_race() to this access to avoid KCSAN complaining about the C-language writes protected by ->lock.

Paul E. McKenney committed 5 years ago

Commit d9ee9621 parent 65bfdd31 file · +1 −1Browse files

Unified · Split

kernel/rcu/tree_stall.h+1−1
@@ -766,7 +766,7 @@ bool rcu_check_boost_fail(unsigned long gp_state, int *cpup) · 765 unmodified lines
766766
767767 rcu_for_each_leaf_node(rnp) {
768768 if (!cpup) {
769− if (READ_ONCE(rnp->qsmask)) {
769+ if (data_race(READ_ONCE(rnp->qsmask))) {
770770 return false;
771771 } else {
772772 if (READ_ONCE(rnp->gp_tasks))

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t