[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230425140955.3834476-9-Liam.Howlett@oracle.com>
Date: Tue, 25 Apr 2023 10:09:29 -0400
From: "Liam R. Howlett" <Liam.Howlett@...cle.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
maple-tree@...ts.infradead.org,
"Liam R. Howlett" <Liam.Howlett@...cle.com>,
"Liam R . Howlett" <Liam.Howlett@...cle.com>
Subject: [PATCH 08/34] maple_tree: Change RCU checks to WARN_ON() instead of BUG_ON()
From: "Liam R. Howlett" <Liam.Howlett@...cle.com>
If RCU is enabled and the tree isn't locked, just warn the user and
avoid crashing the kernel.
Signed-off-by: Liam R. Howlett <Liam.Howlett@...cle.com>
---
include/linux/maple_tree.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/maple_tree.h b/include/linux/maple_tree.h
index 204d7941a39ec..ed92abf4c1fb5 100644
--- a/include/linux/maple_tree.h
+++ b/include/linux/maple_tree.h
@@ -616,7 +616,7 @@ static inline void mt_clear_in_rcu(struct maple_tree *mt)
return;
if (mt_external_lock(mt)) {
- BUG_ON(!mt_lock_is_held(mt));
+ WARN_ON(!mt_lock_is_held(mt));
mt->ma_flags &= ~MT_FLAGS_USE_RCU;
} else {
mtree_lock(mt);
@@ -635,7 +635,7 @@ static inline void mt_set_in_rcu(struct maple_tree *mt)
return;
if (mt_external_lock(mt)) {
- BUG_ON(!mt_lock_is_held(mt));
+ WARN_ON(!mt_lock_is_held(mt));
mt->ma_flags |= MT_FLAGS_USE_RCU;
} else {
mtree_lock(mt);
--
2.39.2
Powered by blists - more mailing lists