diff options
| author | Liam R. Howlett <[email protected]> | 2023-05-18 10:55:17 -0400 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2023-06-09 16:25:29 -0700 |
| commit | 7f2f9dc16fee59afdec2df8c794e97c36e387257 (patch) | |
| tree | ce6b1e471d1c9dd982c064bc9cae14c538d57333 /include/linux | |
| parent | 0d7c52bb29302bf06e6774f4d6494e942213205e (diff) | |
maple_tree: change RCU checks to WARN_ON() instead of BUG_ON()
If RCU is enabled and the tree isn't locked, just warn the user and avoid
crashing the kernel.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Liam R. Howlett <[email protected]>
Cc: David Binderman <[email protected]>
Cc: Peng Zhang <[email protected]>
Cc: Sergey Senozhatsky <[email protected]>
Cc: Vernon Yang <[email protected]>
Cc: Wei Yang <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/maple_tree.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/maple_tree.h b/include/linux/maple_tree.h index 204d7941a39e..ed92abf4c1fb 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); |