diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-11-01 02:47:52 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-11-01 02:47:52 +0000 |
commit | d13f16ffce13c44f9fd57b683982bfbd6d28824e (patch) | |
tree | e4fff8ccd4a0488b86b80e5ab00612fcebe3527b /sys/dev | |
parent | 5215027f282cc0aaa6a82c6d0e85b1a8279fa835 (diff) |
drm/amd/amdgpu: Fix double unlock in amdgpu_mes_add_ring
From Srinivasan Shanmugam
65ca9f8ddc0d1e66770cd5c4a7555a7169dac0d8 in linux-6.6.y/6.6.59
e7457532cb7167516263150ceae86f36d6ef9683 in mainline linux
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/amdgpu_mes.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_mes.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_mes.c index 3cb010f1f5e..d55edc675ba 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_mes.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_mes.c @@ -1053,8 +1053,10 @@ int amdgpu_mes_add_ring(struct amdgpu_device *adev, int gang_id, r = amdgpu_ring_init(adev, ring, 1024, NULL, 0, AMDGPU_RING_PRIO_DEFAULT, NULL); - if (r) + if (r) { + amdgpu_mes_unlock(&adev->mes); goto clean_up_memory; + } amdgpu_mes_ring_to_queue_props(adev, ring, &qprops); @@ -1087,7 +1089,6 @@ clean_up_ring: amdgpu_ring_fini(ring); clean_up_memory: kfree(ring); - amdgpu_mes_unlock(&adev->mes); return r; } |