drm/amdgpu: Fix module unload hang with RAS enabled
authorMukul Joshi <mukul.joshi@amd.com>
Wed, 24 Jan 2024 02:14:51 +0000 (10:14 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 25 Jan 2024 19:57:52 +0000 (14:57 -0500)
commitc84a7e21db79fa899b9ad2d56464779f182789cb
treedb28a905a1839a9385575f6e847a230dddb66e40
parent1e201202eda13dd95c4d6a7d96b0ff58cfbaa2df
drm/amdgpu: Fix module unload hang with RAS enabled

The driver unload hangs because the page retirement
kthread cannot be stopped as it is sleeping and waiting
on page retirement event to occur. Add kthread_should_stop()
to the event condition to wake up the kthread when kthread
stop is called during driver unload.

Fixes: 3fdcd0a31d7a ("drm/amdgpu: Prepare for asynchronous processing of umc page retirement")
Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c