projects
/
users
/
jedix
/
linux-maple.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e831e9c
)
maple_tree: Change RCU checks to WARN_ON() instead of BUG_ON()
author
Liam R. Howlett <Liam.Howlett@Oracle.com>
Thu, 1 Sep 2022 21:33:43 +0000
(17:33 -0400)
committer
Liam R. Howlett <Liam.Howlett@oracle.com>
Mon, 24 Apr 2023 15:40:43 +0000
(11:40 -0400)
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@oracle.com>
include/linux/maple_tree.h
patch
|
blob
|
history
diff --git
a/include/linux/maple_tree.h
b/include/linux/maple_tree.h
index 204d7941a39ec2dbd6052d0c604bcd81baf5d653..ed92abf4c1fb57214ec4c8173677ffaaa5d73c18 100644
(file)
--- 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);