Unverified Commit 9cb5e056 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!12942 fix CVE-2024-47704

Merge Pull Request from: @ci-robot 
 
PR sync from: Jinjiang Tu <tujinjiang@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/THSPJ75XJPJ7Y3VHTAGEOUONSV54I2J7/ 
Alex Hung (2):
  drm/amd/display: Check link_res->hpo_dp_link_enc before using it
  drm/amd/display: Check link_res->hpo_dp_link_enc before using it


-- 
2.34.1
 
https://gitee.com/src-openeuler/kernel/issues/IAYPKL 
 
Link:https://gitee.com/openeuler/kernel/pulls/12942

 

Reviewed-by: default avatarZhang Peng <zhangpeng362@huawei.com>
Signed-off-by: default avatarZhang Peng <zhangpeng362@huawei.com>
parents 20dae581 bfd5a615
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@
#include "dccg.h"
#include "clk_mgr.h"

#define DC_LOGGER link->ctx->logger

void set_hpo_dp_throttled_vcp_size(struct pipe_ctx *pipe_ctx,
		struct fixed31_32 throttled_vcp_size)
{
@@ -108,6 +110,11 @@ void enable_hpo_dp_link_output(struct dc_link *link,
		enum clock_source_id clock_source,
		const struct dc_link_settings *link_settings)
{
	if (!link_res->hpo_dp_link_enc) {
		DC_LOG_ERROR("%s: invalid hpo_dp_link_enc\n", __func__);
		return;
	}

	if (link->dc->res_pool->dccg->funcs->set_symclk32_le_root_clock_gating)
		link->dc->res_pool->dccg->funcs->set_symclk32_le_root_clock_gating(
				link->dc->res_pool->dccg,
@@ -124,6 +131,11 @@ void disable_hpo_dp_link_output(struct dc_link *link,
		const struct link_resource *link_res,
		enum signal_type signal)
{
	if (!link_res->hpo_dp_link_enc) {
		DC_LOG_ERROR("%s: invalid hpo_dp_link_enc\n", __func__);
		return;
	}

		link_res->hpo_dp_link_enc->funcs->link_disable(link_res->hpo_dp_link_enc);
		link_res->hpo_dp_link_enc->funcs->disable_link_phy(
				link_res->hpo_dp_link_enc, signal);