From 7568f45055800c244ca90676de04f2acf129414f Mon Sep 17 00:00:00 2001 From: "Liam R. Howlett" Date: Wed, 2 Dec 2020 12:24:36 -0500 Subject: [PATCH] mm/mmap: Convert unmapped_area_topdown() search to be inclusive search. Signed-off-by: Liam R. Howlett --- mm/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/mmap.c b/mm/mmap.c index 25e3cf0327ff..db22a8ac9723 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -1747,7 +1747,7 @@ static unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info) if (length < info->length) return -ENOMEM; - if (mas_get_empty_area_rev(&mas, info->low_limit, info->high_limit, + if (mas_get_empty_area_rev(&mas, info->low_limit, info->high_limit - 1, length)) { return -ENOMEM; } -- 2.50.1