Skip to content

amdgpu: Make amdgpu_device_deinitialize thread-safe

David Rosca requested to merge nowrep/drm:amd-devdeinit into main

Device will be removed from dev_list when refcount reaches 0, so the dev_mutex must be locked before decreasing reference otherwise there's a race where this device is still in dev_list with refcount 0 which will assert or crash in amdgpu_device_initialize trying to use this device instead of creating new one.

Fixes issue reported in drm/amd#2156 (comment 2268110) (this one specific comment).

Merge request reports

Loading