From: Jiri Slaby <jirislaby@gmail.com>
To: gregkh@suse.de
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Jiri Slaby <jirislaby@gmail.com>,
Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Subject: [PATCH 5/5] USB: wusbcore/wa-xfer, fix lock imbalance
Date: Wed, 11 Mar 2009 21:47:40 +0100 [thread overview]
Message-ID: <1236804460-1432-5-git-send-email-jirislaby@gmail.com> (raw)
In-Reply-To: <1236804460-1432-1-git-send-email-jirislaby@gmail.com>
Fix locking on one wa_urb_enqueue_b's fail path. There was omitted unlock.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.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
prev parent reply other threads:[~2009-03-11 20:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-11 20:47 [PATCH 1/5] USB: atm/cxacru, " 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 ` Jiri Slaby [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1236804460-1432-5-git-send-email-jirislaby@gmail.com \
--to=jirislaby@gmail.com \
--cc=gregkh@suse.de \
--cc=inaky.perez-gonzalez@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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