[PATCH 0/4] Lib fixes for 7.3

From: Liam R. Howlett (Google)

Date: Wed Oct 28 2026 - 11:47:36 EST


Two bugs found by an LLM review, and one problem Lorenzo Stoakes
reported off list.

An RCU reader that restarts after its node dies can dereference NULL if
the tree was emptied, or holds a single entry in the root pointer.
Patch 1 fixes it and patch 2 adds a test.

rhashtable can deadlock when an insert in atomic context grows the
table: the rehash may call vmalloc(), which takes locks that are not
safe against interrupts. Patch 3 keeps non-blocking callers on
kmalloc() or a nested table.

With CONFIG_DEBUG_MAPLE_TREE, MT_WARN_ON() and the other WARN macros
print the tree and call dump_stack() rather than WARN(), so syzbot never
sees them. Patch 4 makes them WARN once per call site, after the dump,
and makes the BUG macros BUG() after theirs.

Chris Mason (1):
rhashtable: fix vmalloc() deadlock in atomic rehash

Liam R. Howlett (Google) (3):
maple_tree: Fix rcu reader NULL dereference after the tree is emptied
maple_tree: Test emptying tree while RCU reading
maple_tree: Update internal warning and bug_on code

include/linux/maple_tree.h | 54 +++++++++-------
lib/maple_tree.c | 110 +++++++++++++++++++++++--------
lib/rhashtable.c | 18 +++++-
lib/test_maple_tree.c | 129 +++++++++++++++++++++++++++++++++++++
4 files changed, 257 insertions(+), 54 deletions(-)

--
2.47.3