提交 f7f20323 编写于 作者: F Fang Lijun 提交者: Yang Yingliang

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: NFang Lijun <fanglijun3@huawei.com>
Reviewed-by: NDing Tianhong <dingtianhong@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 54188f4a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册