Patch "drm/amd/display: Fix potential null dereference" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/amd/display: Fix potential null dereference

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-amd-display-fix-potential-null-dereference.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit bf4050ed170769adc333319125e67f1317e057c5
Author: Igor Artemiev <Igor.A.Artemiev@xxxxxxx>
Date:   Mon Apr 3 16:10:37 2023 +0300

    drm/amd/display: Fix potential null dereference
    
    [ Upstream commit 52f1783ff4146344342422c1cd94fcb4ce39b6fe ]
    
    The adev->dm.dc pointer can be NULL and dereferenced in amdgpu_dm_fini()
    without checking.
    
    Add a NULL pointer check before calling dc_dmub_srv_destroy().
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Fixes: 9a71c7d31734 ("drm/amd/display: Register DMUB service with DC")
    Signed-off-by: Igor Artemiev <Igor.A.Artemiev@xxxxxxx>
    Signed-off-by: Hamza Mahfooz <hamza.mahfooz@xxxxxxx>
    Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 68c98e30fee71..1e0ddf7722cd4 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1707,7 +1707,8 @@ static void amdgpu_dm_fini(struct amdgpu_device *adev)
 		dc_deinit_callbacks(adev->dm.dc);
 #endif
 
-	dc_dmub_srv_destroy(&adev->dm.dc->ctx->dmub_srv);
+	if (adev->dm.dc)
+		dc_dmub_srv_destroy(&adev->dm.dc->ctx->dmub_srv);
 
 	if (dc_enable_dmub_notifications(adev->dm.dc)) {
 		kfree(adev->dm.dmub_notify);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux