[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1236804460-1432-5-git-send-email-jirislaby@gmail.com>
Date: Wed, 11 Mar 2009 21:47:40 +0100
From: Jiri Slaby <jirislaby@...il.com>
To: gregkh@...e.de
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Jiri Slaby <jirislaby@...il.com>,
Inaky Perez-Gonzalez <inaky.perez-gonzalez@...el.com>
Subject: [PATCH 5/5] USB: wusbcore/wa-xfer, fix lock imbalance
Fix locking on one wa_urb_enqueue_b's fail path. There was omitted unlock.
Signed-off-by: Jiri Slaby <jirislaby@...il.com>
Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@...el.com>
---
drivers/usb/wusbcore/wa-xfer.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c
index 238a96a..613a5fc 100644
--- a/drivers/usb/wusbcore/wa-xfer.c
+++ b/drivers/usb/wusbcore/wa-xfer.c
@@ -921,8 +921,10 @@ static void wa_urb_enqueue_b(struct wa_xfer *xfer)
result = -ENODEV;
/* FIXME: segmentation broken -- kills DWA */
mutex_lock(&wusbhc->mutex); /* get a WUSB dev */
- if (urb->dev == NULL)
+ if (urb->dev == NULL) {
+ mutex_unlock(&wusbhc->mutex);
goto error_dev_gone;
+ }
wusb_dev = __wusb_dev_get_by_usb_dev(wusbhc, urb->dev);
if (wusb_dev == NULL) {
mutex_unlock(&wusbhc->mutex);
--
1.6.2
caught by stanse
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists