[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200623004333.27227-3-paulmck@kernel.org>
Date: Mon, 22 Jun 2020 17:43:26 -0700
From: paulmck@...nel.org
To: linux-kernel@...r.kernel.org, kasan-dev@...glegroups.com,
kernel-team@...com, mingo@...nel.org
Cc: elver@...gle.com, andreyknvl@...gle.com, glider@...gle.com,
dvyukov@...gle.com, cai@....pw, boqun.feng@...il.com,
"Paul E. McKenney" <paulmck@...nel.org>
Subject: [PATCH tip/core/rcu 03/10] rculist: Add ASSERT_EXCLUSIVE_ACCESS() to __list_splice_init_rcu()
From: "Paul E. McKenney" <paulmck@...nel.org>
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 <paulmck@...nel.org>
Cc: Marco Elver <elver@...gle.com>
---
include/linux/rculist.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/rculist.h b/include/linux/rculist.h
index df587d1..2ebd112 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.
--
2.9.5
Powered by blists - more mailing lists