Fix lock imbalance in debugfs wave reader
Subsystems (2)
I introduced a lock imbalance in the debugfs wave reader. This patch fixes that.
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 1/1 drm/amd/amdgpu: Fix debugfs wave reader
In reply to a message not in the archiveOn non VI/CZ platforms it would not free
the grbm index lock.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -2
@@ -3025,13 +3025,14 @@ static ssize_t amdgpu_debugfs_wave_read(struct file *f, char __user *buf, data[x++] =wave_read_ind (adev,0x2378 ,0x2379 , simd, wave,0x14 ); data[x++] =wave_read_ind (adev,0x2378 ,0x2379 , simd, wave,0x1A ); data[x++] =wave_read_ind (adev,0x2378 ,0x2379 , simd, wave,0x1B ); - }else { -return -EINVAL ; }amdgpu_gfx_select_se_sh (adev,0xFFFFFFFF ,0xFFFFFFFF ,0xFFFFFFFF );mutex_unlock (&adev->grbm_idx_mutex); +if (!x) +return -EINVAL ; +while (size && (*pos < x *4 )) {uint32_t value;
Signature · 6 lines
2.10.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Alex Deucher
Reviewed-byRe: [PATCH] drm/amd/amdgpu: Fix debugfs wave reader
In reply to a message not in the archiveQuoted 5 lines · Tom St Denis
On non VI/CZ platforms it would not free
the grbm index lock.Signed-off-by Tom St Denis <[email protected]>---
Quoted 27 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3
-3@@ -3025,13 +3025,14 @@ static ssize_t amdgpu_debugfs_wave_read(struct file *f, char __user *buf, data[x++] =wave_read_ind (adev,0x2378 ,0x2379 , simd, wave,0x14 ); data[x++] =wave_read_ind (adev,0x2378 ,0x2379 , simd, wave,0x1A ); data[x++] =wave_read_ind (adev,0x2378 ,0x2379 , simd, wave,0x1B ); - }else { -return -EINVAL ; }amdgpu_gfx_select_se_sh (adev,0xFFFFFFFF ,0xFFFFFFFF ,0xFFFFFFFF );mutex_unlock (&adev->grbm_idx_mutex); +if (!x) +return -EINVAL ; +while (size && (*pos < x *4 )) {uint32_t value; --2.10.0
Quoted 4 lines
_______________________________________________
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
Christian König
Reviewed-byRe: [PATCH] drm/amd/amdgpu: Fix debugfs wave reader
In reply to a message not in the archiveAm 14.10.2016 um 01:13 schrieb Alex Deucher:
Quoted 7 lines · Tom St Denis
Quoted 5 lines
On non VI/CZ platforms it would not free
the grbm index lock.Signed-off-by Tom St Denis <[email protected]>---
Reviewed-by Alex Deucher <[email protected]>
Quoted 28 lines
Quoted 28 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3
-3@@ -3025,13 +3025,14 @@ static ssize_t amdgpu_debugfs_wave_read(struct file *f, char __user *buf, data[x++] =wave_read_ind (adev,0x2378 ,0x2379 , simd, wave,0x14 ); data[x++] =wave_read_ind (adev,0x2378 ,0x2379 , simd, wave,0x1A ); data[x++] =wave_read_ind (adev,0x2378 ,0x2379 , simd, wave,0x1B ); - }else { -return -EINVAL ; }amdgpu_gfx_select_se_sh (adev,0xFFFFFFFF ,0xFFFFFFFF ,0xFFFFFFFF );mutex_unlock (&adev->grbm_idx_mutex); +if (!x) +return -EINVAL ; +while (size && (*pos < x *4 )) {uint32_t value; --2.10.0
Quoted 8 lines
Quoted 4 lines
_______________________________________________
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
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx