Patch "drm/amdgpu: amdgpu_ttm_gart_bind set gtt bound flag" has been added to the 6.8-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: amdgpu_ttm_gart_bind set gtt bound flag

to the 6.8-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-amdgpu_ttm_gart_bind-set-gtt-bound-flag.patch
and it can be found in the queue-6.8 subdirectory.

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



commit c0343127c6106790ca17491b6fe7db4d0297aca7
Author: Philip Yang <Philip.Yang@xxxxxxx>
Date:   Mon Mar 11 18:07:34 2024 -0400

    drm/amdgpu: amdgpu_ttm_gart_bind set gtt bound flag
    
    [ Upstream commit 6c6064cbe58b43533e3451ad6a8ba9736c109ac3 ]
    
    Otherwise after the GTT bo is released, the GTT and gart space is freed
    but amdgpu_ttm_backend_unbind will not clear the gart page table entry
    and leave valid mapping entry pointing to the stale system page. Then
    if GPU access the gart address mistakely, it will read undefined value
    instead page fault, harder to debug and reproduce the real issue.
    
    Cc: stable@xxxxxxxxxxxxxxx
    Signed-off-by: Philip Yang <Philip.Yang@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_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 75c9fd2c6c2a1..b0ed10f4de609 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -869,6 +869,7 @@ static void amdgpu_ttm_gart_bind(struct amdgpu_device *adev,
 		amdgpu_gart_bind(adev, gtt->offset, ttm->num_pages,
 				 gtt->ttm.dma_address, flags);
 	}
+	gtt->bound = true;
 }
 
 /*




[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