Patch "drm/amdgpu: Fix potential NULL dereference" has been added to the 6.1-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/amdgpu: Fix potential NULL dereference

to the 6.1-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-amdgpu-fix-potential-null-dereference.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 1cbce5ec8e6ce678d060ef683b45499b2972704b
Author: Luben Tuikov <luben.tuikov@xxxxxxx>
Date:   Wed Jan 4 17:09:02 2023 -0500

    drm/amdgpu: Fix potential NULL dereference
    
    [ Upstream commit 0be7ed8e7eb15282b5d0f6fdfea884db594ea9bf ]
    
    Fix potential NULL dereference, in the case when "man", the resource manager
    might be NULL, when/if we print debug information.
    
    Cc: Alex Deucher <Alexander.Deucher@xxxxxxx>
    Cc: Christian König <christian.koenig@xxxxxxx>
    Cc: AMD Graphics <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>
    Cc: Dan Carpenter <error27@xxxxxxxxx>
    Cc: kernel test robot <lkp@xxxxxxxxx>
    Fixes: 7554886daa31ea ("drm/amdgpu: Fix size validation for non-exclusive domains (v4)")
    Signed-off-by: Luben Tuikov <luben.tuikov@xxxxxxx>
    Reviewed-by: Christian König <christian.koenig@xxxxxxx>
    Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 3be3cba3a16d..cfd78c4a45ba 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -468,8 +468,9 @@ static bool amdgpu_bo_validate_size(struct amdgpu_device *adev,
 	return true;
 
 fail:
-	DRM_DEBUG("BO size %lu > total memory in domain: %llu\n", size,
-		  man->size);
+	if (man)
+		DRM_DEBUG("BO size %lu > total memory in domain: %llu\n", size,
+			  man->size);
 	return false;
 }
 



[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