From: Alexander Strakh <strakh@ispras.ru>
To: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
Andy Walls <awalls@md.metrocast.net>
Subject: BUG: return from function without mutex_unlock in drivers/media/video/cx231xx/cx231xx-core.c
Date: Mon, 13 Dec 2010 19:35:22 +0300 [thread overview]
Message-ID: <201012131936.13172.strakh@ispras.ru> (raw)
KERNEL_VERSION: 2.6.36
SUBJECT: return from function without mutex_unlock in
drivers/media/video/cx231xx/cx231xx-core.c
SUBSCRIBE:
1. In line 282 in function cx231xx_read_ctrl_reg mutex was locked.
2. If usb_control_msg returns ret<0 then we exit from function
cx231xx_read_ctrl_reg without unlocking mutex. In other (ret>=0) case mutex
has been unlocked before exiting in line 295.
282 mutex_lock(&dev->ctrl_urb_lock);
283 ret = usb_control_msg(dev->udev, pipe, req,
284 USB_DIR_IN | USB_TYPE_VENDOR |
USB_RECIP_DEVICE,
285 val, reg, dev->urb_buf, len, HZ);
286 if (ret < 0) {
287 cx231xx_isocdbg(" failed!\n");
288 /* mutex_unlock(&dev->ctrl_urb_lock); */
289 return ret;
290 }
291
292 if (len)
293 memcpy(buf, dev->urb_buf, len);
294
295 mutex_unlock(&dev->ctrl_urb_lock);
Found by Linux Device Drivers Verification Project
reply other threads:[~2010-12-13 16:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201012131936.13172.strakh@ispras.ru \
--to=strakh@ispras.ru \
--cc=awalls@md.metrocast.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@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
all inboxes | Powered by JetHome®