mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/5] USB: atm/cxacru, fix lock imbalance
@ 2009-03-11 20:47 Jiri Slaby
  2009-03-11 20:47 ` [PATCH 2/5] USB: image/mdc800, " Jiri Slaby
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jiri Slaby @ 2009-03-11 20:47 UTC (permalink / raw)
  To: gregkh; +Cc: linux-usb, linux-kernel, Jiri Slaby, Simon Arlott

We do not hold mutex in one place in cxacru_cm, but unlock it on fail path.
Fix this.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Simon Arlott <cxacru@fire.lp0.eu>
---
 drivers/usb/atm/cxacru.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index 5ed4ae0..6789089 100644
--- a/drivers/usb/atm/cxacru.c
+++ b/drivers/usb/atm/cxacru.c
@@ -485,7 +485,7 @@ static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm,
 			usb_err(instance->usbatm, "requested transfer size too large (%d, %d)\n",
 				wbuflen, rbuflen);
 		ret = -ENOMEM;
-		goto fail;
+		goto err;
 	}
 
 	mutex_lock(&instance->cm_serialize);
@@ -565,6 +565,7 @@ static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm,
 	dbg("cm %#x", cm);
 fail:
 	mutex_unlock(&instance->cm_serialize);
+err:
 	return ret;
 }
 
-- 
1.6.2
caught by stanse

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

end of thread, other threads:[~2009-03-11 20:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-11 20:47 [PATCH 1/5] USB: atm/cxacru, fix lock imbalance Jiri Slaby
2009-03-11 20:47 ` [PATCH 2/5] USB: image/mdc800, " Jiri Slaby
2009-03-11 20:47 ` [PATCH 3/5] USB: misc/adutux, " Jiri Slaby
2009-03-11 20:47 ` [PATCH 4/5] USB: misc/vstusb, " Jiri Slaby
2009-03-11 20:47 ` [PATCH 5/5] USB: wusbcore/wa-xfer, " Jiri Slaby

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

Powered by JetHome