]> www.infradead.org Git - users/willy/xarray.git/commit
maple_tree: remove rcu_read_lock() from mt_validate()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 20 Aug 2024 17:54:17 +0000 (13:54 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 2 Sep 2024 00:59:01 +0000 (17:59 -0700)
commitf806de88d8f7f8191afd0fd9b94db4cd058e7d4f
treef45262d730d256cd077e7ef811adbc79ed13fd80
parent6dacd79d28842ff01f18b4900d897741aac5999e
maple_tree: remove rcu_read_lock() from mt_validate()

The write lock should be held when validating the tree to avoid updates
racing with checks.  Holding the rcu read lock during a large tree
validation may also cause a prolonged rcu read window and "rcu_preempt
detected stalls" warnings.

Link: https://lore.kernel.org/all/0000000000001d12d4062005aea1@google.com/
Link: https://lkml.kernel.org/r/20240820175417.2782532-1-Liam.Howlett@oracle.com
Fixes: 54a611b60590 ("Maple Tree: add new data structure")
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Reported-by: syzbot+036af2f0c7338a33b0cd@syzkaller.appspotmail.com
Cc: Hillf Danton <hdanton@sina.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/maple_tree.c