mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 13:03:48 +00:00
When CONFIG_DEBUG_MAPLE_TREE is set, call WARN_ON() once per site after
the custom information is dumped about the tree. Without using the
kernel's WARN_ON calls, syzbot will not catch issues detected by this
code. The BUG_ON variants now stop instead of dumping and continuing.
Update the non-debug code to call WARN_ON_ONCE() as well.
The userspace tests asserted on dump_stack() but only print on
WARN_ON(), so make WARN() fatal in maple-shared.h and have the maple
test exit with the result of maple_tree_seed().
Link: https://lore.kernel.org/[email protected]
Fixes: f0a1f866ab ("maple_tree: add debug BUG_ON and WARN_ON variants")
Signed-off-by: Liam R. Howlett (Google) <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reported-by: Lorenzo Stoakes <[email protected]>
Reviewed-by: Lorenzo Stoakes (ARM) <[email protected]>
Cc: Chris Mason <[email protected]>
Cc: Alice Ryhl <[email protected]>
Cc: Andrew Ballance <[email protected]>
Cc: <[email protected]>