Skip to content

Commit c93773c

Browse files
committed
rculist: Add ASSERT_EXCLUSIVE_ACCESS() to __list_splice_init_rcu()
After the sync() in __list_splice_init_rcu(), there should be no readers traversing the old list. This commit therefore enlists the help of KCSAN to verify this condition via a pair of calls to ASSERT_EXCLUSIVE_ACCESS(). Signed-off-by: Paul E. McKenney <[email protected]> Cc: Marco Elver <[email protected]>
1 parent cb38f82 commit c93773c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/linux/rculist.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ static inline void __list_splice_init_rcu(struct list_head *list,
248248
*/
249249

250250
sync();
251+
ASSERT_EXCLUSIVE_ACCESS(*first);
252+
ASSERT_EXCLUSIVE_ACCESS(*last);
251253

252254
/*
253255
* Readers are finished with the source list, so perform splice.

0 commit comments

Comments
 (0)