Commit 47249371 authored by Peng Liu's avatar Peng Liu Committed by Zheng Zengkai
Browse files

kfence: Fix wrong memblock_free when enable dynamic

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I51C37


CVE: NA

--------------------------------

Patch "kfence: Add a module parameter to adjust kfence objects" use
memblock_free to free memory allocated from memblock, but a virtual
address is passed to memblock_free where a physical address is
expected. This mistake will lead to memory leak when fail to alloc
kfence pool. Use __pa() to fix this, and the impact can be observed
by "cat /proc/meminfo".

Fixes: 901b983c ("kfence: Add a module parameter to adjust kfence objects")
Signed-off-by: default avatarPeng Liu <liupeng256@huawei.com>
Reviewed-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 16a9f8e6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment