mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
drm/amdgpu: Fix the null pointer dereference to ras_manager
[ Upstream commit 4c11d30c95576937c6c35e6f29884761f2dddb43 ] Check ras_manager before using it Signed-off-by: Ma Jun <Jun.Ma2@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1b8aa82b80
commit
48cada0ac7
@@ -1679,12 +1679,15 @@ static void amdgpu_ras_interrupt_process_handler(struct work_struct *work)
|
|||||||
int amdgpu_ras_interrupt_dispatch(struct amdgpu_device *adev,
|
int amdgpu_ras_interrupt_dispatch(struct amdgpu_device *adev,
|
||||||
struct ras_dispatch_if *info)
|
struct ras_dispatch_if *info)
|
||||||
{
|
{
|
||||||
struct ras_manager *obj = amdgpu_ras_find_obj(adev, &info->head);
|
struct ras_manager *obj;
|
||||||
struct ras_ih_data *data = &obj->ih_data;
|
struct ras_ih_data *data;
|
||||||
|
|
||||||
|
obj = amdgpu_ras_find_obj(adev, &info->head);
|
||||||
if (!obj)
|
if (!obj)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
data = &obj->ih_data;
|
||||||
|
|
||||||
if (data->inuse == 0)
|
if (data->inuse == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user