]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: fix mas_prev() and mas_find() state handling
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 20 Jan 2023 16:26:07 +0000 (11:26 -0500)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 22 Mar 2023 16:04:24 +0000 (12:04 -0400)
commit0482a10852260bc80dbacab0c8f8b16727c48807
treed89b479ee9bb680877f34247adcb604076bc565e
parent2cab15e4a9109809972325a2e77dcec6f8976681
maple_tree: fix mas_prev() and mas_find() state handling

When mas_prev() does not find anything, set the state to MAS_NONE.

Handle the MAS_NONE in mas_find() like a MAS_START.

Link: https://lkml.kernel.org/r/20230120162650.984577-7-Liam.Howlett@oracle.com
Cc: <Stable@vger.kernel.org>
Fixes: 54a611b60590 ("Maple Tree: add new data structure")
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Reported-by: <syzbot+502859d610c661e56545@syzkaller.appspotmail.com>
lib/maple_tree.c