Unverified Commit 531e1a2d authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!7484 fix CVE-2024-26661

Merge Pull Request from: @ci-robot 
 
PR sync from: Liao Chen <liaochen4@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/JSC7HO32QF4LZC7PTHW6Q53CVBN43DS3/ 
In "u32 otg_inst = pipe_ctx->stream_res.tg->inst;"
pipe_ctx->stream_res.tg could be NULL, it is relying on the caller to
ensure the tg is not NULL.

Dan Carpenter (1):

Srinivasan Shanmugam (1):
  drm/amd/display: Add NULL test for 'timing generator' in
    'dcn21_set_pipe()'


-- 
2.34.1
 
https://gitee.com/src-openeuler/kernel/issues/I9DNF6 
 
Link:https://gitee.com/openeuler/kernel/pulls/7484

 

Reviewed-by: default avatarZhang Jianhua <chris.zjh@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents 83c20d4b 9d49a04d
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -179,9 +179,15 @@ void dcn21_set_abm_immediate_disable(struct pipe_ctx *pipe_ctx)
void dcn21_set_pipe(struct pipe_ctx *pipe_ctx)
{
	struct abm *abm = pipe_ctx->stream_res.abm;
	uint32_t otg_inst = pipe_ctx->stream_res.tg->inst;
	struct timing_generator *tg = pipe_ctx->stream_res.tg;
	struct panel_cntl *panel_cntl = pipe_ctx->stream->link->panel_cntl;
	struct dmcu *dmcu = pipe_ctx->stream->ctx->dc->res_pool->dmcu;
	uint32_t otg_inst;

	if (!abm || !tg || !panel_cntl)
		return;

	otg_inst = tg->inst;

	if (dmcu) {
		dce110_set_pipe(pipe_ctx);