drm/amdgpu: Fix kernel NULL pointer dereference when amdgpu fini
Subsystems (2)
PATCH 1/2 drm/amdgpu: Fix kernel NULL pointer dereference when amdgpu fini
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -1
@@ -1493,7 +1493,8 @@ static int amdgpu_device_ip_fini(struct amdgpu_device *adev)continue ;if (adev->ip_blocks[i].version->type !=AMD_IP_BLOCK_TYPE_UVD && - adev->ip_blocks[i].version->type !=AMD_IP_BLOCK_TYPE_VCE ) { + adev->ip_blocks[i].version->type !=AMD_IP_BLOCK_TYPE_VCE && + adev->ip_blocks[i].version->funcs->set_clockgating_state) {/* ungate blocks before hw fini so that we can shutdown the blocks safely */ r = adev->ip_blocks[i].version->funcs->set_clockgating_state ((void *)adev,AMD_CG_STATE_UNGATE );
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +1 -0
@@ -259,6 +259,7 @@ void amdgpu_irq_fini(struct amdgpu_device *adev) } }kfree (adev->irq.client[i].sources); + adev->irq.client[i].sources =NULL ; } }
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1521535031-3100-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org
PATCH 2/2 drm/amdgpu: Fix kernel NULL pointer dereference in dpm functions
caused by
'commit 83e3c4615872 ("drm/amdgpu: Remove wrapper layer of smu ip functions")'
BUG: unable to handle kernel NULL pointer dereference at 00000000000005d8 [ 313.241459] IP: ci_dpm_read_sensor+0x37/0xf0 [amdgpu]
--- drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 1 + drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 1 + drivers/gpu/drm/amd/amdgpu/si_dpm.c | 1 + 3 files changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/ci_dpm.c +1 -0
@@ -6244,6 +6244,7 @@ static int ci_dpm_early_init(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle; adev->powerplay.pp_funcs = &ci_dpm_funcs; + adev->powerplay.pp_handle = adev;ci_dpm_set_irq_funcs (adev);return 0 ;
drivers/gpu/drm/amd/amdgpu/kv_dpm.c +1 -0
@@ -2963,6 +2963,7 @@ static int kv_dpm_early_init(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle; adev->powerplay.pp_funcs = &kv_dpm_funcs; + adev->powerplay.pp_handle = adev;kv_dpm_set_irq_funcs (adev);return 0 ;
drivers/gpu/drm/amd/amdgpu/si_dpm.c +1 -0
@@ -7917,6 +7917,7 @@ static int si_dpm_early_init(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle; adev->powerplay.pp_funcs = &si_dpm_funcs; + adev->powerplay.pp_handle = adev;si_dpm_set_irq_funcs (adev);return 0 ; }
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1521535031-3100-2-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Reviewed-byRe: [PATCH 2/2] drm/amdgpu: Fix kernel NULL pointer dereference in dpm functions
Series is:
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Rex Zhu <[email protected]>
Sent: Tuesday, March 20, 2018 4:37:11 AM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH 2/2] drm/amdgpu: Fix kernel NULL pointer dereference in dpm functions
caused by
'commit 83e3c4615872 ("drm/amdgpu: Remove wrapper layer of smu ip functions")'
BUG: unable to handle kernel NULL pointer dereference at 00000000000005d8 [ 313.241459] IP: ci_dpm_read_sensor+0x37/0xf0 [amdgpu]
--- drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 1 + drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 1 + drivers/gpu/drm/amd/amdgpu/si_dpm.c | 1 + 3 files changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/ci_dpm.c +1 -0
@@ -6244,6 +6244,7 @@ static int ci_dpm_early_init(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle; adev->powerplay.pp_funcs = &ci_dpm_funcs; + adev->powerplay.pp_handle = adev;ci_dpm_set_irq_funcs (adev);return 0 ;
drivers/gpu/drm/amd/amdgpu/kv_dpm.c +1 -0
@@ -2963,6 +2963,7 @@ static int kv_dpm_early_init(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle; adev->powerplay.pp_funcs = &kv_dpm_funcs; + adev->powerplay.pp_handle = adev;kv_dpm_set_irq_funcs (adev);return 0 ;
drivers/gpu/drm/amd/amdgpu/si_dpm.c +1 -0
@@ -7917,6 +7917,7 @@ static int si_dpm_early_init(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle; adev->powerplay.pp_funcs = &si_dpm_funcs; + adev->powerplay.pp_handle = adev;si_dpm_set_irq_funcs (adev);return 0 ; }
--
1.9.1
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx