public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RDMA/cxgb4: remove accidentally left mutex_unlock(&dev_mutex)
@ 2011-08-31 20:43 Alexey Khoroshilov
       [not found] ` <1314823410-12621-1-git-send-email-khoroshilov-ufN2psIa012HXe+LvDLADg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Alexey Khoroshilov @ 2011-08-31 20:43 UTC (permalink / raw)
  To: Steve Wise
  Cc: Alexey Khoroshilov, Roland Dreier, Sean Hefty, Hal Rosenstock,
	linux-rdma, linux-kernel, ldv-project

The patch "RDMA/cxgb4: EEH errors can hang the driver" removes
mutex lock/unlock from c4iw_alloc() except for error path.
This patch removes the remained mutex_unlock(&dev_mutex).

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
---
 drivers/infiniband/hw/cxgb4/device.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c
index 40a13cc..35896ff 100644
--- a/drivers/infiniband/hw/cxgb4/device.c
+++ b/drivers/infiniband/hw/cxgb4/device.c
@@ -414,7 +414,6 @@ static struct c4iw_dev *c4iw_alloc(const struct cxgb4_lld_info *infop)
 
 	ret = c4iw_rdev_open(&devp->rdev);
 	if (ret) {
-		mutex_unlock(&dev_mutex);
 		printk(KERN_ERR MOD "Unable to open CXIO rdev err %d\n", ret);
 		ib_dealloc_device(&devp->ibdev);
 		return ERR_PTR(ret);
-- 
1.7.4.1

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

* Re: [PATCH] RDMA/cxgb4: remove accidentally left mutex_unlock(&dev_mutex)
       [not found] ` <1314823410-12621-1-git-send-email-khoroshilov-ufN2psIa012HXe+LvDLADg@public.gmane.org>
@ 2011-08-31 20:46   ` Steve Wise
  2011-08-31 21:01     ` Alexey Khoroshilov
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Wise @ 2011-08-31 20:46 UTC (permalink / raw)
  To: Alexey Khoroshilov
  Cc: Steve Wise, Roland Dreier, Sean Hefty, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	ldv-project-ufN2psIa012HXe+LvDLADg

On 08/31/2011 03:43 PM, Alexey Khoroshilov wrote:
> The patch "RDMA/cxgb4: EEH errors can hang the driver" removes
> mutex lock/unlock from c4iw_alloc() except for error path.
> This patch removes the remained mutex_unlock(&dev_mutex).
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Signed-off-by: Alexey Khoroshilov<khoroshilov-ufN2psIa012HXe+LvDLADg@public.gmane.org>
> ---
>   drivers/infiniband/hw/cxgb4/device.c |    1 -
>   1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c
> index 40a13cc..35896ff 100644
> --- a/drivers/infiniband/hw/cxgb4/device.c
> +++ b/drivers/infiniband/hw/cxgb4/device.c
> @@ -414,7 +414,6 @@ static struct c4iw_dev *c4iw_alloc(const struct cxgb4_lld_info *infop)
>
>   	ret = c4iw_rdev_open(&devp->rdev);
>   	if (ret) {
> -		mutex_unlock(&dev_mutex);
>   		printk(KERN_ERR MOD "Unable to open CXIO rdev err %d\n", ret);
>   		ib_dealloc_device(&devp->ibdev);
>   		return ERR_PTR(ret);

This is actually included in my previously submitted patch:

https://patchwork.kernel.org/patch/1026942/

Steve.


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] RDMA/cxgb4: remove accidentally left mutex_unlock(&dev_mutex)
  2011-08-31 20:46   ` Steve Wise
@ 2011-08-31 21:01     ` Alexey Khoroshilov
  0 siblings, 0 replies; 3+ messages in thread
From: Alexey Khoroshilov @ 2011-08-31 21:01 UTC (permalink / raw)
  To: Steve Wise
  Cc: Steve Wise, Roland Dreier, Sean Hefty, Hal Rosenstock, linux-rdma,
	linux-kernel, ldv-project

On 01 Sep 2011, 00:46 Steve Wise wrote:
> On 08/31/2011 03:43 PM, Alexey Khoroshilov wrote:
>> The patch "RDMA/cxgb4: EEH errors can hang the driver" removes
>> mutex lock/unlock from c4iw_alloc() except for error path.
>> This patch removes the remained mutex_unlock(&dev_mutex).
>>
>> Found by Linux Driver Verification project (linuxtesting.org).
>>
>> Signed-off-by: Alexey Khoroshilov<khoroshilov@ispras.ru>
>> ---
>>   drivers/infiniband/hw/cxgb4/device.c |    1 -
>>   1 files changed, 0 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/infiniband/hw/cxgb4/device.c
>> b/drivers/infiniband/hw/cxgb4/device.c
>> index 40a13cc..35896ff 100644
>> --- a/drivers/infiniband/hw/cxgb4/device.c
>> +++ b/drivers/infiniband/hw/cxgb4/device.c
>> @@ -414,7 +414,6 @@ static struct c4iw_dev *c4iw_alloc(const struct
>> cxgb4_lld_info *infop)
>>
>>   	ret = c4iw_rdev_open(&devp->rdev);
>>   	if (ret) {
>> -		mutex_unlock(&dev_mutex);
>>   		printk(KERN_ERR MOD "Unable to open CXIO rdev err %d\n", ret);
>>   		ib_dealloc_device(&devp->ibdev);
>>   		return ERR_PTR(ret);
>
> This is actually included in my previously submitted patch:
>
> https://patchwork.kernel.org/patch/1026942/
>
> Steve.

Great.

--
Alexey

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

end of thread, other threads:[~2011-08-31 21:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-31 20:43 [PATCH] RDMA/cxgb4: remove accidentally left mutex_unlock(&dev_mutex) Alexey Khoroshilov
     [not found] ` <1314823410-12621-1-git-send-email-khoroshilov-ufN2psIa012HXe+LvDLADg@public.gmane.org>
2011-08-31 20:46   ` Steve Wise
2011-08-31 21:01     ` Alexey Khoroshilov

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