From f7f203238aa35cee581e645d7847ec636b965b58 Mon Sep 17 00:00:00 2001 From: Fang Lijun Date: Sat, 30 Oct 2021 11:08:47 +0800 Subject: [PATCH] mm/vmalloc: Fix a double free in __vmalloc_node_range ascend inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4EUVI CVE: NA -------------------------------------------------- The "area" is removed and freed in __vmalloc_area_node when it returned NULL, we needn't call free_vm_area to remove and free this area again. Fixes: 59a57a82fb2a ("mm/vmalloc: Hugepage vmalloc mappings") Signed-off-by: Fang Lijun Reviewed-by: Ding Tianhong Signed-off-by: Yang Yingliang Reviewed-by: Weilong Chen Signed-off-by: Yang Yingliang --- mm/vmalloc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 813befec2bf0..4b0970d6fc91 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2709,7 +2709,6 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align, fail: if (shift > PAGE_SHIFT) { - free_vm_area(area); shift = PAGE_SHIFT; align = real_align; size = real_size; -- GitLab