From: Paul E. McKenney Date: Wed, 12 Feb 2020 21:29:15 +0000 (-0800) Subject: rculist: Add ASSERT_EXCLUSIVE_ACCESS() to __list_splice_init_rcu() X-Git-Tag: v5.9-rc1~203^2~2^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c93773c1a3fedf6c3f6fa12833e2b74a9897c3e3;p=thirdparty%2Fkernel%2Flinux.git 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 Cc: Marco Elver --- diff --git a/include/linux/rculist.h b/include/linux/rculist.h index df587d181844b..2ebd112f86f72 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h @@ -248,6 +248,8 @@ static inline void __list_splice_init_rcu(struct list_head *list, */ sync(); + ASSERT_EXCLUSIVE_ACCESS(*first); + ASSERT_EXCLUSIVE_ACCESS(*last); /* * Readers are finished with the source list, so perform splice.