diff options
author | 2020-07-09 10:31:13 +0000 | |
---|---|---|
committer | 2020-07-09 10:31:13 +0000 | |
commit | 204a49e6885cf4d44b9d118e71b058f4af0c8bc9 (patch) | |
tree | 3142bc86e97138a470c961515ce6c85b5ec132fe /sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c | |
parent | drm/amdgpu: fix non-pointer dereference for non-RAS supported (diff) | |
download | wireguard-openbsd-204a49e6885cf4d44b9d118e71b058f4af0c8bc9.tar.xz wireguard-openbsd-204a49e6885cf4d44b9d118e71b058f4af0c8bc9.zip |
drm/amdgpu: fix kernel page fault issue by ras recovery on sGPU
From Guchun Chen
18b1cf2968e1baa883dbdf6adef6213626beaa0f in linux 5.7.y/5.7.8
12c17b9d62663c14a5343d6742682b3e67280754 in mainline linux
Diffstat (limited to 'sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c')
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c index b0c21e49b9b..56360b18312 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c @@ -1463,9 +1463,10 @@ static void amdgpu_ras_do_recovery(struct work_struct *work) struct amdgpu_hive_info *hive = amdgpu_get_xgmi_hive(adev, false); /* Build list of devices to query RAS related errors */ - if (hive && adev->gmc.xgmi.num_physical_nodes > 1) { + if (hive && adev->gmc.xgmi.num_physical_nodes > 1) device_list_handle = &hive->device_list; - } else { + else { + INIT_LIST_HEAD(&device_list); list_add_tail(&adev->gmc.xgmi.head, &device_list); device_list_handle = &device_list; } |