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@xxxxxxxxxxxxxxx BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=216911 Reported-by: amanieu@xxxxxxxxx Fixes: 54a611b60590 ("Maple Tree: add new data structure") Link: https://lore.kernel.org/linux-mm/0b9f5425-08d4-8013-aa4c-e620c3b10bb2@xxxxxxxxxxxxx/ Signed-off-by: Liam R. Howlett <Liam.Howlett@xxxxxxxxxx>
Tested-by: Holger Hoffstätte <holger@xxxxxxxxxxxxxxxxxxxxxx>