Commit 713b8198 authored by Wang Wensheng's avatar Wang Wensheng Committed by Yongqiang Liu
Browse files

mm/sharepool: Check sp_is_enabled() before show spa_stat

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


CVE: NA

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

When we read file /proc/sharepool/spa_stat, we use sp_mapping_normal to
iterator all the normal sp_area. The global pointer sp_mapping_normal is
NULL if the sharepool feature is not enabled via kernel bootarg. This
leads to a null-pointer-dereference issue.

Signed-off-by: default avatarWang Wensheng <wangwensheng4@huawei.com>
Reviewed-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent 2467bc50
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment