mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH next] drm/amdgpu: Fix a double lock bug
@ 2024-10-17 19:40 Dan Carpenter
  2024-10-18  6:28 ` Lazar, Lijo
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2024-10-17 19:40 UTC (permalink / raw)
  To: Lijo Lazar
  Cc: Alex Deucher, Christian König, Xinhui Pan, David Airlie,
	Simona Vetter, Hawking Zhang, Yang Wang, Tao Zhou,
	Vignesh Chander, Shiwu Zhang, Feifei Xu, Rajneesh Bhardwaj,
	amd-gfx, dri-devel, linux-kernel, kernel-janitors

This was supposed to be an unlock instead of a lock.  The original
code will lead to a deadlock.

Fixes: ee52489d1210 ("drm/amdgpu: Place NPS mode request on unload")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
From static analysis, not testing.
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
index fcdbcff57632..3be07bcfd117 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
@@ -1605,7 +1605,7 @@ int amdgpu_xgmi_request_nps_change(struct amdgpu_device *adev,
 					     gmc.xgmi.head)
 		adev->gmc.gmc_funcs->request_mem_partition_mode(tmp_adev,
 								cur_nps_mode);
-	mutex_lock(&hive->hive_lock);
+	mutex_unlock(&hive->hive_lock);
 
 	return r;
 }
-- 
2.45.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-18  6:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-17 19:40 [PATCH next] drm/amdgpu: Fix a double lock bug Dan Carpenter
2024-10-18  6:28 ` Lazar, Lijo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®