All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 1/3 -next] tcm_vhost: unlock on error in tcm_vhost_drop_nexus()
@ 2012-07-12 14:47 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2012-07-12 14:47 UTC (permalink / raw)
  To: Michael S. Tsirkin, Nicholas Bellinger
  Cc: kernel-janitors, kvm, virtualization

We need to unlock here before returning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c
index da0b8ac..d217bed 100644
--- a/drivers/vhost/tcm_vhost.c
+++ b/drivers/vhost/tcm_vhost.c
@@ -1189,6 +1189,7 @@ static int tcm_vhost_drop_nexus(
 	}
 
 	if (atomic_read(&tpg->tv_tpg_vhost_count)) {
+		mutex_unlock(&tpg->tv_tpg_mutex);
 		pr_err("Unable to remove TCM_vHost I_T Nexus with"
 			" active TPG vhost count: %d\n",
 			atomic_read(&tpg->tv_tpg_vhost_count));

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

* [patch 1/3 -next] tcm_vhost: unlock on error in tcm_vhost_drop_nexus()
@ 2012-07-12 14:47 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2012-07-12 14:47 UTC (permalink / raw)
  To: Michael S. Tsirkin, Nicholas Bellinger
  Cc: kernel-janitors, kvm, virtualization

We need to unlock here before returning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c
index da0b8ac..d217bed 100644
--- a/drivers/vhost/tcm_vhost.c
+++ b/drivers/vhost/tcm_vhost.c
@@ -1189,6 +1189,7 @@ static int tcm_vhost_drop_nexus(
 	}
 
 	if (atomic_read(&tpg->tv_tpg_vhost_count)) {
+		mutex_unlock(&tpg->tv_tpg_mutex);
 		pr_err("Unable to remove TCM_vHost I_T Nexus with"
 			" active TPG vhost count: %d\n",
 			atomic_read(&tpg->tv_tpg_vhost_count));

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

* Re: [patch 1/3 -next] tcm_vhost: unlock on error in tcm_vhost_drop_nexus()
  2012-07-12 14:47 ` Dan Carpenter
@ 2012-07-12 21:47   ` Nicholas A. Bellinger
  -1 siblings, 0 replies; 4+ messages in thread
From: Nicholas A. Bellinger @ 2012-07-12 21:47 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: target-devel, virtualization, kernel-janitors, kvm, Michael S. Tsirkin

On Thu, 2012-07-12 at 17:47 +0300, Dan Carpenter wrote:
> We need to unlock here before returning.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c
> index da0b8ac..d217bed 100644
> --- a/drivers/vhost/tcm_vhost.c
> +++ b/drivers/vhost/tcm_vhost.c
> @@ -1189,6 +1189,7 @@ static int tcm_vhost_drop_nexus(
>  	}
>  
>  	if (atomic_read(&tpg->tv_tpg_vhost_count)) {
> +		mutex_unlock(&tpg->tv_tpg_mutex);
>  		pr_err("Unable to remove TCM_vHost I_T Nexus with"
>  			" active TPG vhost count: %d\n",
>  			atomic_read(&tpg->tv_tpg_vhost_count));

Applied.  Thanks Dan!


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

* Re: [patch 1/3 -next] tcm_vhost: unlock on error in tcm_vhost_drop_nexus()
@ 2012-07-12 21:47   ` Nicholas A. Bellinger
  0 siblings, 0 replies; 4+ messages in thread
From: Nicholas A. Bellinger @ 2012-07-12 21:47 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: target-devel, virtualization, kernel-janitors, kvm, Michael S. Tsirkin

On Thu, 2012-07-12 at 17:47 +0300, Dan Carpenter wrote:
> We need to unlock here before returning.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c
> index da0b8ac..d217bed 100644
> --- a/drivers/vhost/tcm_vhost.c
> +++ b/drivers/vhost/tcm_vhost.c
> @@ -1189,6 +1189,7 @@ static int tcm_vhost_drop_nexus(
>  	}
>  
>  	if (atomic_read(&tpg->tv_tpg_vhost_count)) {
> +		mutex_unlock(&tpg->tv_tpg_mutex);
>  		pr_err("Unable to remove TCM_vHost I_T Nexus with"
>  			" active TPG vhost count: %d\n",
>  			atomic_read(&tpg->tv_tpg_vhost_count));

Applied.  Thanks Dan!

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

end of thread, other threads:[~2012-07-12 21:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-12 14:47 [patch 1/3 -next] tcm_vhost: unlock on error in tcm_vhost_drop_nexus() Dan Carpenter
2012-07-12 14:47 ` Dan Carpenter
2012-07-12 21:47 ` Nicholas A. Bellinger
2012-07-12 21:47   ` Nicholas A. Bellinger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.