提交 f589c6b5 编写于 作者: L Lipeng Sang

malidp: Fix NULL vs IS_ERR() checking

stable inclusion
from stable-v5.19.17
commit 15342f93
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I6IXPT
CVE: CVE-2023-23004

Reference: https://github.com/torvalds/linux/commit/15342f930ebebcfe36f2415049736a77d7d2e045

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

commit 15342f93 upstream.

The get_sg_table() function does not return NULL.
It returns error pointers.
Signed-off-by: NMiaoqian Lin <linmq006@gmail.com>
Signed-off-by: NLiviu Dudau <liviu.dudau@arm.com>
Link: https://lore.kernel.org/dri-devel/20211213072115.18098-1-linmq006@gmail.com/Signed-off-by: NLipeng Sang <sanglipeng1@jd.com>
上级 1f74be50
......@@ -348,7 +348,7 @@ static bool malidp_check_pages_threshold(struct malidp_plane_state *ms,
else
sgt = obj->funcs->get_sg_table(obj);
if (!sgt)
if (IS_ERR(sgt))
return false;
sgl = sgt->sgl;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册