Re: [PATCH 2/2] drm/amdgpu: Fix kernel NULL pointer dereference in dpm functions

2018-03-20 Thread Deucher, Alexander
Series is:

Reviewed-by: Alex Deucher <alexander.deuc...@amd.com>


From: amd-gfx <amd-gfx-boun...@lists.freedesktop.org> on behalf of Rex Zhu 
<rex@amd.com>
Sent: Tuesday, March 20, 2018 4:37:11 AM
To: amd-gfx@lists.freedesktop.org
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 05d8
[  313.241459] IP: ci_dpm_read_sensor+0x37/0xf0 [amdgpu]

Change-Id: Iac0cf26264ccbc60181ccd9bba79fe3c4e420456
Signed-off-by: Rex Zhu <rex@amd.com>
---
 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(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c 
b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
index 98d1dd2..47ef3e6 100644
--- a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
@@ -6244,6 +6244,7 @@ static int ci_dpm_early_init(void *handle)
 struct amdgpu_device *adev = (struct amdgpu_device *)handle;

 adev->powerplay.pp_funcs = _dpm_funcs;
+   adev->powerplay.pp_handle = adev;
 ci_dpm_set_irq_funcs(adev);

 return 0;
diff --git a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c 
b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
index 81babe0..26ba984 100644
--- a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
@@ -2963,6 +2963,7 @@ static int kv_dpm_early_init(void *handle)
 struct amdgpu_device *adev = (struct amdgpu_device *)handle;

 adev->powerplay.pp_funcs = _dpm_funcs;
+   adev->powerplay.pp_handle = adev;
 kv_dpm_set_irq_funcs(adev);

 return 0;
diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c 
b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
index 3bfcf0d..672eaff 100644
--- a/drivers/gpu/drm/amd/amdgpu/si_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
@@ -7917,6 +7917,7 @@ static int si_dpm_early_init(void *handle)
 struct amdgpu_device *adev = (struct amdgpu_device *)handle;

 adev->powerplay.pp_funcs = _dpm_funcs;
+   adev->powerplay.pp_handle = adev;
 si_dpm_set_irq_funcs(adev);
 return 0;
 }
--
1.9.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 2/2] drm/amdgpu: Fix kernel NULL pointer dereference in dpm functions

2018-03-20 Thread Rex Zhu
caused by
'commit 83e3c4615872 ("drm/amdgpu: Remove wrapper layer of smu ip functions")'

BUG: unable to handle kernel NULL pointer dereference at 05d8
[  313.241459] IP: ci_dpm_read_sensor+0x37/0xf0 [amdgpu]

Change-Id: Iac0cf26264ccbc60181ccd9bba79fe3c4e420456
Signed-off-by: Rex Zhu 
---
 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(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c 
b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
index 98d1dd2..47ef3e6 100644
--- a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
@@ -6244,6 +6244,7 @@ static int ci_dpm_early_init(void *handle)
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
adev->powerplay.pp_funcs = _dpm_funcs;
+   adev->powerplay.pp_handle = adev;
ci_dpm_set_irq_funcs(adev);
 
return 0;
diff --git a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c 
b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
index 81babe0..26ba984 100644
--- a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
@@ -2963,6 +2963,7 @@ static int kv_dpm_early_init(void *handle)
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
adev->powerplay.pp_funcs = _dpm_funcs;
+   adev->powerplay.pp_handle = adev;
kv_dpm_set_irq_funcs(adev);
 
return 0;
diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c 
b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
index 3bfcf0d..672eaff 100644
--- a/drivers/gpu/drm/amd/amdgpu/si_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
@@ -7917,6 +7917,7 @@ static int si_dpm_early_init(void *handle)
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
adev->powerplay.pp_funcs = _dpm_funcs;
+   adev->powerplay.pp_handle = adev;
si_dpm_set_irq_funcs(adev);
return 0;
 }
-- 
1.9.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx