MMU notifier callback unmap the svm range update page table may free the PTB BO, then amdgpu_fill_buffer zero BO memory could cause deadlock as kmalloc may trigger MMU notifier. amdgpu_vm_pt_clear setup PTB BO memory with initial value, and no sensitive data in page table that must be wiped out before releasing the memory. So don't clear the memory when PTB BO is released. Signed-off-by: Philip Yang <Philip.Yang@xxxxxxx> --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 8a7b0f6162da..65b4ff6979ee 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -576,7 +576,7 @@ int amdgpu_bo_create(struct amdgpu_device *adev, if (!amdgpu_bo_support_uswc(bo->flags)) bo->flags &= ~AMDGPU_GEM_CREATE_CPU_GTT_USWC; - if (adev->ras_enabled) + if (adev->ras_enabled && bp->type != ttm_bo_type_kernel) bo->flags |= AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE; bo->tbo.bdev = &adev->mman.bdev; -- 2.35.1