OSDN Git Service

maple_tree: reduce user error potential
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 20 Jan 2023 16:26:04 +0000 (11:26 -0500)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 10 Feb 2023 00:51:30 +0000 (16:51 -0800)
commit50e81c82ad947045c7ed26ddc9acb17276b653b6
treee3e72a797d5ee9c6c2f90d19c44cff8a8d5cee02
parent65be6f058b0eba98dc6c6f197ea9f62c9b6a519f
maple_tree: reduce user error potential

When iterating, a user may operate on the tree and cause the maple state
to be altered and left in an unintuitive state.  Detect this scenario and
correct it by setting to the limit and invalidating the state.

Link: https://lkml.kernel.org/r/20230120162650.984577-4-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/maple_tree.c