mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] nouveau/gsp/r535: remove a stray unlock in r535_gsp_rpc_send()
@ 2023-11-27 12:56 Dan Carpenter
  2023-11-27 20:05 ` [Nouveau] " Timur Tabi
  2023-11-29  2:09 ` Danilo Krummrich
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2023-11-27 12:56 UTC (permalink / raw)
  To: Karol Herbst
  Cc: Lyude Paul, Danilo Krummrich, David Airlie, Daniel Vetter,
	Dave Airlie, dri-devel, nouveau, linux-kernel, kernel-janitors

This unlock doesn't belong here and it leads to a double unlock in
the caller, r535_gsp_rpc_push().

Fixes: 176fdcbddfd2 ("drm/nouveau/gsp/r535: add support for booting GSP-RM")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
index dc44f5c7833f..818e5c73b7a6 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
@@ -365,10 +365,8 @@ r535_gsp_rpc_send(struct nvkm_gsp *gsp, void *argv, bool wait, u32 repc)
 	}
 
 	ret = r535_gsp_cmdq_push(gsp, rpc);
-	if (ret) {
-		mutex_unlock(&gsp->cmdq.mutex);
+	if (ret)
 		return ERR_PTR(ret);
-	}
 
 	if (wait) {
 		msg = r535_gsp_msg_recv(gsp, fn, repc);
-- 
2.42.0


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

* Re: [Nouveau] [PATCH] nouveau/gsp/r535: remove a stray unlock in r535_gsp_rpc_send()
  2023-11-27 12:56 [PATCH] nouveau/gsp/r535: remove a stray unlock in r535_gsp_rpc_send() Dan Carpenter
@ 2023-11-27 20:05 ` Timur Tabi
  2023-11-29  2:09 ` Danilo Krummrich
  1 sibling, 0 replies; 3+ messages in thread
From: Timur Tabi @ 2023-11-27 20:05 UTC (permalink / raw)
  To: kherbst, dan.carpenter
  Cc: dri-devel, nouveau, airlied, kernel-janitors, linux-kernel, daniel

On Mon, 2023-11-27 at 15:56 +0300, Dan Carpenter wrote:
> This unlock doesn't belong here and it leads to a double unlock in
> the caller, r535_gsp_rpc_push().
> 
> Fixes: 176fdcbddfd2 ("drm/nouveau/gsp/r535: add support for booting GSP-
> RM")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Nice catch!

Reviewed-by: Timur Tabi <ttabi@nvidia.com>


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

* Re: [PATCH] nouveau/gsp/r535: remove a stray unlock in r535_gsp_rpc_send()
  2023-11-27 12:56 [PATCH] nouveau/gsp/r535: remove a stray unlock in r535_gsp_rpc_send() Dan Carpenter
  2023-11-27 20:05 ` [Nouveau] " Timur Tabi
@ 2023-11-29  2:09 ` Danilo Krummrich
  1 sibling, 0 replies; 3+ messages in thread
From: Danilo Krummrich @ 2023-11-29  2:09 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Lyude Paul, David Airlie, Daniel Vetter, Dave Airlie, dri-devel,
	nouveau, linux-kernel, kernel-janitors, Karol Herbst

On 11/27/23 13:56, Dan Carpenter wrote:
> This unlock doesn't belong here and it leads to a double unlock in
> the caller, r535_gsp_rpc_push().
> 
> Fixes: 176fdcbddfd2 ("drm/nouveau/gsp/r535: add support for booting GSP-RM")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Good catch - applied to drm-misc-fixes.

- Danilo

> ---
>   drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
> index dc44f5c7833f..818e5c73b7a6 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
> @@ -365,10 +365,8 @@ r535_gsp_rpc_send(struct nvkm_gsp *gsp, void *argv, bool wait, u32 repc)
>   	}
>   
>   	ret = r535_gsp_cmdq_push(gsp, rpc);
> -	if (ret) {
> -		mutex_unlock(&gsp->cmdq.mutex);
> +	if (ret)
>   		return ERR_PTR(ret);
> -	}
>   
>   	if (wait) {
>   		msg = r535_gsp_msg_recv(gsp, fn, repc);


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

end of thread, other threads:[~2023-11-29  2:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-27 12:56 [PATCH] nouveau/gsp/r535: remove a stray unlock in r535_gsp_rpc_send() Dan Carpenter
2023-11-27 20:05 ` [Nouveau] " Timur Tabi
2023-11-29  2:09 ` Danilo Krummrich

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®