From nobody Sat Feb 7 21:48:09 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F171130A43; Wed, 27 Mar 2024 12:07:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711541235; cv=none; b=T9rngUfMF/K26XDCDy29Ae1RzCzldZbuh06uCYx5Oy8+VLC8Leet6s8DhjhWShnsLBvx3ae98y98CVuxuDCB1uSimkehlHuJ5zQ1VOOLEhzUaaNGwVoyCbrw9wIvqcUaVlessx2RBgFwfKQeCB6a63c8wyzyx9At9s3x572LWr0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711541235; c=relaxed/simple; bh=6Ox5DYyl2t+2FPWYSXR6ueq1egkwhGJJ/amF216+lRU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=VM9JdM91De3zC1jlG48s8ngy0vaGoAA1h2q5WSB+Y2vQqKxhzuNFwwXzsZvJMpTIqsa5i+6yL4wldpAsFgGqI6ib3+z8ZdRyQ60cpbVDFeJra9hVxN2WrHlp6ahwSQjxzMYBSEwKFrC55cDalZOVRt0/KDNMkjjNo3nwPKl7PLM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UaSBeBc3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UaSBeBc3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BAC5CC433C7; Wed, 27 Mar 2024 12:07:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711541234; bh=6Ox5DYyl2t+2FPWYSXR6ueq1egkwhGJJ/amF216+lRU=; h=From:To:Cc:Subject:Date:From; b=UaSBeBc3qytCyLE+jWaI9YP3lRnuF3yFllGDq0lzFfwBZXcAMoVcdlCA2Ydp6CaeR iww1wwzNPUe8Pc/hx7dN7SRiaMA22I6djEFH/8fsUdElBc864+A+V70c1N2D9WK9wv J0ZgQl4NsAibuVG3EMXzDz4N9X4IQ+0xh7S3gpTg80E1r8ykwxZg2pH8Q9+GQP9lU3 Q7M/dA8p7FbDKnacSGFW+uh9Zdcbg4PZIgwBAJtI4+vhqD71CHiZ8/+veROlgBo2y/ HA1ujzMQ7n782SkjuaCH8OBb9aTf/OKBZyp5wRBxyVLT97/s8PScgOH/S4SeHF3uX+ doT/uJZMJ75Ww== From: Sasha Levin To: stable@vger.kernel.org, srinivasan.shanmugam@amd.com Cc: Aurabindo Pillai , Rodrigo Siqueira , Hamza Mahfooz , Wenjing Liu , Qingqing Zhuo , Alex Deucher , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: FAILED: Patch "drm/amd/display: Fix late derefrence 'dsc' check in 'link_set_dsc_pps_packet()'" failed to apply to 6.8-stable tree Date: Wed, 27 Mar 2024 08:07:12 -0400 Message-ID: <20240327120712.2825234-1-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Hint: ignore X-stable: review Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The patch below does not apply to the 6.8-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . Thanks, Sasha Reviewed-by: Aurabindo Pillai ------------------ original commit in Linus's tree ------------------ From 166225e79ccc3d02c4c46e1b3c09d03eb91473ca Mon Sep 17 00:00:00 2001 From: Srinivasan Shanmugam Date: Wed, 10 Jan 2024 20:58:35 +0530 Subject: [PATCH] drm/amd/display: Fix late derefrence 'dsc' check in 'link_set_dsc_pps_packet()' In link_set_dsc_pps_packet(), 'struct display_stream_compressor *dsc' was dereferenced in a DC_LOGGER_INIT(dsc->ctx->logger); before the 'dsc' NULL pointer check. Fixes the below: drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dpms.c:905 link_set_dsc_= pps_packet() warn: variable dereferenced before check 'dsc' (see line 903) Cc: stable@vger.kernel.org Cc: Aurabindo Pillai Cc: Rodrigo Siqueira Cc: Hamza Mahfooz Cc: Wenjing Liu Cc: Qingqing Zhuo Signed-off-by: Srinivasan Shanmugam Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/link/link_dpms.c b/drivers/gpu/= drm/amd/display/dc/link/link_dpms.c index 3de148004c066..3cbfbf8d107e9 100644 --- a/drivers/gpu/drm/amd/display/dc/link/link_dpms.c +++ b/drivers/gpu/drm/amd/display/dc/link/link_dpms.c @@ -900,11 +900,15 @@ bool link_set_dsc_pps_packet(struct pipe_ctx *pipe_ct= x, bool enable, bool immedi { struct display_stream_compressor *dsc =3D pipe_ctx->stream_res.dsc; struct dc_stream_state *stream =3D pipe_ctx->stream; - DC_LOGGER_INIT(dsc->ctx->logger); =20 - if (!pipe_ctx->stream->timing.flags.DSC || !dsc) + if (!pipe_ctx->stream->timing.flags.DSC) return false; =20 + if (!dsc) + return false; + + DC_LOGGER_INIT(dsc->ctx->logger); + if (enable) { struct dsc_config dsc_cfg; uint8_t dsc_packed_pps[128]; --=20 2.43.0