linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] maple_tree: Fix mas_prev() state regression.
@ 2023-09-21 18:12 Liam R. Howlett
  2023-09-21 18:12 ` [PATCH 1/2] maple_tree: Add mas_active() to detect in-tree walks Liam R. Howlett
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Liam R. Howlett @ 2023-09-21 18:12 UTC (permalink / raw)
  To: Andrew Morton
  Cc: maple-tree, linux-mm, linux-kernel, pedro.falcato, stable,
	Liam R. Howlett

Pedro Falcato contacted me on IRC with an mprotect regression which was
bisected back to the iterator changes for maple tree.  Root cause
analysis showed the mas_prev() running off the end of the VMA space
(previous from 0) followed by mas_find(), would skip the first value.

This patch set introduces maple state underflow/overflow so the sequence
of calls on the maple state will return what the user expects.

Liam R. Howlett (2):
  maple_tree: Add mas_active() to detect in-tree walks
  maple_tree: Add MAS_UNDERFLOW and MAS_OVERFLOW states

 include/linux/maple_tree.h |  11 ++
 lib/maple_tree.c           | 221 +++++++++++++++++++++++++++----------
 lib/test_maple_tree.c      |  87 ++++++++++++---
 3 files changed, 246 insertions(+), 73 deletions(-)

-- 
2.39.2



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-09-21 23:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-21 18:12 [PATCH 0/2] maple_tree: Fix mas_prev() state regression Liam R. Howlett
2023-09-21 18:12 ` [PATCH 1/2] maple_tree: Add mas_active() to detect in-tree walks Liam R. Howlett
2023-09-21 18:12 ` [PATCH 2/2] maple_tree: Add MAS_UNDERFLOW and MAS_OVERFLOW states Liam R. Howlett
2023-09-21 18:40   ` Matthew Wilcox
2023-09-21 18:47     ` Liam R. Howlett
2023-09-21 18:25 ` [PATCH 0/2] maple_tree: Fix mas_prev() state regression Andrew Morton
2023-09-21 18:53   ` Liam R. Howlett
2023-09-21 19:23     ` Matthew Wilcox
2023-09-21 23:27       ` Andrew Morton
2023-09-21 23:34         ` Liam R. Howlett
2023-09-21 23:41           ` Pedro Falcato
2023-09-21 23:51             ` Liam R. Howlett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox