From: Andrew Morton <akpm@linux-foundation.org>
To: linux-media@vger.kernel.org
Cc: bugzilla-daemon@bugzilla.kernel.org,
bugme-daemon@bugzilla.kernel.org, strakh@ispras.ru
Subject: Re: [Bugme-new] [Bug 13951] New: in function device_authorization mutex is not released on error path.
Date: Mon, 10 Aug 2009 22:25:17 -0700 [thread overview]
Message-ID: <20090810222517.aff70402.akpm@linux-foundation.org> (raw)
In-Reply-To: <bug-13951-10286@http.bugzilla.kernel.org/>
(switched to email. Please respond via emailed reply-to-all, not via the
bugzilla web interface).
On Mon, 10 Aug 2009 08:16:08 GMT bugzilla-daemon@bugzilla.kernel.org wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=13951
>
> Summary: in function device_authorization mutex is not released
> on error path.
> Product: Drivers
> Version: 2.5
> Kernel Version: 2.6.30
> Platform: All
> OS/Version: Linux
> Tree: Mainline
> Status: NEW
> Severity: normal
> Priority: P1
> Component: Video(Other)
> AssignedTo: drivers_video-other@kernel-bugs.osdl.org
> ReportedBy: strakh@ispras.ru
> Regression: No
>
>
> In ./drivers/media/video/hdpvr/hdpvr-core.c in function
> device authorization:
> If after mutex lock (line 4) usb control msg returns ret!=46 we go to
> label
> error. In this case before exit from function mutex must be unlocked.
>
> 01) static int device authorization(struct hdpvr device *dev)
> 02) {
> 03) ............
> 04) mutex lock(&dev->usbc mutex);
> 05) ret = usb control msg(dev->udev,
> 06) usb rcvctrlpipe(dev->udev, 0),
> 07) rcv request, 0x80 | request type,
> 08) 0x0400, 0x0003,
> 09) dev->usbc buf, 46,10000);
> 10) if (ret != 46) {
> 11) v4l2 err(&dev->v4l2 dev,
> 12) "unexpected answer of status request, len %d\n",
> ret);
> 13) goto error;
> 14) }
> 15) .................
> 16) error:
> 17)
> 18) return retval;
> 19) }
>
Alexander, it would make life simpler if you were to just email patches
which fix things like this!
Thanks.
parent reply other threads:[~2009-08-11 5:25 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <bug-13951-10286@http.bugzilla.kernel.org/>]
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=20090810222517.aff70402.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=bugzilla-daemon@bugzilla.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=strakh@ispras.ru \
/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