Patch "drm/amdgpu: Check if NBIO funcs are NULL in amdgpu_device_baco_exit" 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: Check if NBIO funcs are NULL in amdgpu_device_baco_exit

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-check-if-nbio-funcs-are-null-in-amdgpu_de.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 dc43122bb3b6aabf53b502150fa999c9bc98bd44
Author: Friedrich Vock <friedrich.vock@xxxxxx>
Date:   Tue May 14 09:06:38 2024 +0200

    drm/amdgpu: Check if NBIO funcs are NULL in amdgpu_device_baco_exit
    
    [ Upstream commit 0cdb3f9740844b9d95ca413e3fcff11f81223ecf ]
    
    The special case for VM passthrough doesn't check adev->nbio.funcs
    before dereferencing it. If GPUs that don't have an NBIO block are
    passed through, this leads to a NULL pointer dereference on startup.
    
    Signed-off-by: Friedrich Vock <friedrich.vock@xxxxxx>
    Fixes: 1bece222eabe ("drm/amdgpu: Clear doorbell interrupt status for Sienna Cichlid")
    Cc: Alex Deucher <alexander.deucher@xxxxxxx>
    Cc: Christian König <christian.koenig@xxxxxxx>
    Acked-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_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 157441dd07041..d4faa489bd5fa 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -5815,7 +5815,7 @@ int amdgpu_device_baco_exit(struct drm_device *dev)
 	    adev->nbio.funcs->enable_doorbell_interrupt)
 		adev->nbio.funcs->enable_doorbell_interrupt(adev, true);
 
-	if (amdgpu_passthrough(adev) &&
+	if (amdgpu_passthrough(adev) && adev->nbio.funcs &&
 	    adev->nbio.funcs->clear_doorbell_interrupt)
 		adev->nbio.funcs->clear_doorbell_interrupt(adev);
 




[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