linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] thunderbolt: unlock on error path in tb_domain_add()
@ 2021-03-23 13:19 Dan Carpenter
  2021-03-23 14:21 ` Mika Westerberg
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-03-23 13:19 UTC (permalink / raw)
  To: Andreas Noever, Mika Westerberg
  Cc: Michael Jamet, Yehezkel Bernat, Richard Weinberger, linux-usb,
	linux-mtd, kernel-janitors

We accidentally deleted this unlock on the error path.  Undelete it.

Fixes: 7f0a34d7900b ("thunderbolt: Decrease control channel timeout for software connection manager")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/thunderbolt/domain.c | 1 +
 1 files changed, 1 insertions(+), 0 deletion(-)

diff --git a/drivers/thunderbolt/domain.c b/drivers/thunderbolt/domain.c
index a7d83eec3d15..98f4056f89ff 100644
--- a/drivers/thunderbolt/domain.c
+++ b/drivers/thunderbolt/domain.c
@@ -493,6 +493,7 @@ int tb_domain_add(struct tb *tb)
 	device_del(&tb->dev);
 err_ctl_stop:
 	tb_ctl_stop(tb->ctl);
+	mutex_unlock(&tb->lock);
 
 	return ret;
 }

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

* Re: [PATCH] thunderbolt: unlock on error path in tb_domain_add()
  2021-03-23 13:19 [PATCH] thunderbolt: unlock on error path in tb_domain_add() Dan Carpenter
@ 2021-03-23 14:21 ` Mika Westerberg
  0 siblings, 0 replies; 2+ messages in thread
From: Mika Westerberg @ 2021-03-23 14:21 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Andreas Noever, Michael Jamet, Yehezkel Bernat,
	Richard Weinberger, linux-usb, linux-mtd, kernel-janitors,
	Julia Lawall

On Tue, Mar 23, 2021 at 04:19:06PM +0300, Dan Carpenter wrote:
> We accidentally deleted this unlock on the error path.  Undelete it.
> 
> Fixes: 7f0a34d7900b ("thunderbolt: Decrease control channel timeout for software connection manager")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Julia also reported this yesterday and I was just about to send a patch
that fixes it too :) Applied this one now, thanks!

> ---
>  drivers/thunderbolt/domain.c | 1 +
>  1 files changed, 1 insertions(+), 0 deletion(-)
> 
> diff --git a/drivers/thunderbolt/domain.c b/drivers/thunderbolt/domain.c
> index a7d83eec3d15..98f4056f89ff 100644
> --- a/drivers/thunderbolt/domain.c
> +++ b/drivers/thunderbolt/domain.c
> @@ -493,6 +493,7 @@ int tb_domain_add(struct tb *tb)
>  	device_del(&tb->dev);
>  err_ctl_stop:
>  	tb_ctl_stop(tb->ctl);
> +	mutex_unlock(&tb->lock);
>  
>  	return ret;
>  }

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

end of thread, other threads:[~2021-03-23 14:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23 13:19 [PATCH] thunderbolt: unlock on error path in tb_domain_add() Dan Carpenter
2021-03-23 14:21 ` Mika Westerberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).