]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: Avoid null pointer in SMI event
authorAmber Lin <Amber.Lin@amd.com>
Tue, 30 Mar 2021 17:05:33 +0000 (13:05 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Apr 2021 20:50:42 +0000 (16:50 -0400)
commit790a73b3f51070f1ad97b3d134ab39e433577944
tree07e15b3f9416cf25d0f22bdfa9c912b10dd3911b
parent230c9f8559cd579f8f95fef2cf5bfdbcd5a6fa15
drm/amdkfd: Avoid null pointer in SMI event

Power Management IP is initialized/enabled before KFD init. When a
thermal throttling happens before kfd_smi_init is done, calling the KFD
SMI update function causes a stack dump by referring a NULL pointer (
smi_clients list). Check if kfd_init is completed before calling the
function.

Signed-off-by: Amber Lin <Amber.Lin@amd.com>
Reviewed-by: Mukul Joshi <mukul.joshi@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device.c