diff options
author | Oak Zeng <[email protected]> | 2021-07-15 18:34:25 -0500 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2021-07-23 10:08:00 -0400 |
commit | 4f942aaeb19dbf2135931120cc806d459add4788 (patch) | |
tree | 4b40dddc9e1921155700d94e32052066ad81cfb9 /drivers/gpu/drm/amd/display/include/bios_parser_interface.h | |
parent | 78ccea9ff2ad6fb5c73f146b46193ef15d6ede5f (diff) |
drm/amdkfd: Fix a concurrency issue during kfd recovery
start_cpsch and stop_cpsch can be called during kfd device
initialization or during gpu reset/recovery. So they can
run concurrently. Currently in start_cpsch and stop_cpsch,
pm_init and pm_uninit is not protected by the dpm lock.
Imagine such a case that user use packet manager's function
to submit a pm4 packet to hang hws (ie through command
cat /sys/class/kfd/kfd/topology/nodes/1/gpu_id | sudo tee
/sys/kernel/debug/kfd/hang_hws), while kfd device is under
device reset/recovery so packet manager can be not initialized.
There will be unpredictable protection fault in such case.
This patch moves pm_init/uninit inside the dpm lock and check
packet manager is initialized before using packet manager
function.
Signed-off-by: Oak Zeng <[email protected]>
Acked-by: Christian Konig <[email protected]>
Reviewed-by: Felix Kuehling <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/display/include/bios_parser_interface.h')
0 files changed, 0 insertions, 0 deletions