[PATCH] maple_tree: Fix mas_empty_area_rev() lower bound validation

Holger Hoffstätte holger at applied-asynchrony.com
Wed Jan 11 12:52:22 PST 2023


On 2023-01-11 21:02, Liam Howlett wrote:
> mas_empty_area_rev() was not correctly validating the start of a gap
> against the lower limit.  This could lead to the range starting lower
> than the requested minimum.
> 
> Fix the issue by better validating a gap once one is found.
> 
> This commit also adds tests to the maple tree test suite for this issue
> and tests the mas_empty_area() function for similar bound checking.
> 
> Cc: stable at vger.kernel.org
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=216911
> Reported-by: amanieu at gmail.com
> Fixes: 54a611b60590 ("Maple Tree: add new data structure")
> Link: https://lore.kernel.org/linux-mm/0b9f5425-08d4-8013-aa4c-e620c3b10bb2@leemhuis.info/
> Signed-off-by: Liam R. Howlett <Liam.Howlett at oracle.com>

Tested-by: Holger Hoffstätte <holger at applied-asynchrony.com>



More information about the maple-tree mailing list