[ Sasha's backport helper bot ] Hi, The upstream commit SHA1 provided is correct: 2a3cfb9a24a28da9cc13d2c525a76548865e182c WARNING: Author mismatch between patch and upstream commit: Backport author: <jianqi.ren.cn@xxxxxxxxxxxxx> Commit author: Nikita Zhandarovich <n.zhandarovich@xxxxxxxxxx> Status in newer kernel trees: 6.12.y | Present (exact SHA1) 6.6.y | Present (different SHA1: e040f1fbe9ab) 6.1.y | Not found Note: The patch differs from the upstream commit: --- 1: 2a3cfb9a24a28 ! 1: da3cc3fa89a29 drm/amd/display: fix NULL checks for adev->dm.dc in amdgpu_dm_fini() @@ Metadata ## Commit message ## drm/amd/display: fix NULL checks for adev->dm.dc in amdgpu_dm_fini() + [ Upstream commit 2a3cfb9a24a28da9cc13d2c525a76548865e182c ] + Since 'adev->dm.dc' in amdgpu_dm_fini() might turn out to be NULL before the call to dc_enable_dmub_notifications(), check beforehand to ensure there will not be a possible NULL-ptr-deref @@ Commit message Fixes: 81927e2808be ("drm/amd/display: Support for DMUB AUX") Signed-off-by: Nikita Zhandarovich <n.zhandarovich@xxxxxxxxxx> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> + Signed-off-by: Jianqi Ren <jianqi.ren.cn@xxxxxxxxxxxxx> ## drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c ## @@ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c: static void amdgpu_dm_fini(struct amdgpu_device *adev) - adev->dm.hdcp_workqueue = NULL; - } + dc_deinit_callbacks(adev->dm.dc); + #endif - if (adev->dm.dc) + if (adev->dm.dc) { - dc_deinit_callbacks(adev->dm.dc); -- -- if (adev->dm.dc) dc_dmub_srv_destroy(&adev->dm.dc->ctx->dmub_srv); - - if (dc_enable_dmub_notifications(adev->dm.dc)) { --- Results of testing on various branches: | Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-6.1.y | Success | Success |