提交 a9eb7ed3 编写于 作者: D Ding Tianhong 提交者: Yang Yingliang

share_pool: don't trace the invalid spa address

ascend inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4M23J
CVE: NA

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

Don't use the spa's va_start if the spa is not valid.
Signed-off-by: NDing Tianhong <dingtianhong@huawei.com>
Reviewed-by: NWeilong Chen <chenweilong@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 95ca7b29
...@@ -2500,13 +2500,14 @@ static void sp_alloc_finish(int result, struct sp_area *spa, ...@@ -2500,13 +2500,14 @@ static void sp_alloc_finish(int result, struct sp_area *spa,
sp_update_process_stat(current, true, spa); sp_update_process_stat(current, true, spa);
/* this will free spa if mmap failed */ /* this will free spa if mmap failed */
if (spa && !IS_ERR(spa)) if (spa && !IS_ERR(spa)) {
__sp_area_drop(spa); __sp_area_drop(spa);
trace_sp_alloc_finish(ac, spa->va_start);
}
if (!is_pass_through) if (!is_pass_through)
sp_group_drop(spg); sp_group_drop(spg);
trace_sp_alloc_finish(ac, spa->va_start);
sp_dump_stack(); sp_dump_stack();
sp_try_to_compact(); sp_try_to_compact();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册