From c53e4db71276bf257b09010935a04bdafddd458e Mon Sep 17 00:00:00 2001 From: xinhui pan Date: Fri, 17 May 2019 10:27:44 +0800 Subject: [PATCH] drm/amdgpu: cancel late_init_work before gpu reset gpu reset will run late_init and schedule the late_init_work. if we keep triggering gpu reset in a short time, there are potenial races. Signed-off-by: xinhui pan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 0ffa6733f2b9..7a8c2201cd04 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -3593,6 +3593,8 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, dev_info(adev->dev, "GPU reset begin!\n"); + cancel_delayed_work_sync(&adev->late_init_work); + hive = amdgpu_get_xgmi_hive(adev, false); /*