From: Devin Heitmueller <devin.heitmueller@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Simon Arlott <simon@fire.lp0.eu>,
linux-kernel@vger.kernel.org, mchehab@infradead.org,
linux-media@vger.kernel.org
Subject: Re: [PATCH] dvb-core: Fix potential mutex_unlock without mutex_lock in dvb_dvr_read
Date: Thu, 30 Apr 2009 17:54:39 -0400 [thread overview]
Message-ID: <412bdbff0904301454x46fb9de5hbe8f7d67da7bf887@mail.gmail.com> (raw)
In-Reply-To: <20090430144840.6605e564.akpm@linux-foundation.org>
On Thu, Apr 30, 2009 at 5:48 PM, Andrew Morton
<akpm@linux-foundation.org> wrote:
> On Thu, 30 Apr 2009 22:42:06 +0100
> Simon Arlott <simon@fire.lp0.eu> wrote:
>
>> >> diff --git a/drivers/media/dvb/dvb-core/dmxdev.c b/drivers/media/dvb/dvb-core/dmxdev.c
>> >> index c35fbb8..d6d098a 100644
>> >> --- a/drivers/media/dvb/dvb-core/dmxdev.c
>> >> +++ b/drivers/media/dvb/dvb-core/dmxdev.c
>> >> @@ -247,7 +247,7 @@ static ssize_t dvb_dvr_read(struct file *file, char __user *buf, size_t count,
>> >> int ret;
>> >>
>> >> if (dmxdev->exit) {
>> >> - mutex_unlock(&dmxdev->mutex);
>> >> + //mutex_unlock(&dmxdev->mutex);
>> >> return -ENODEV;
>> >> }
>> >
>> > Is there any value in retaining all the commented-out lock operations,
>> > or can we zap 'em?
>>
>> I'm assuming they should really be there - it's just not practical
>> because the call to dvb_dmxdev_buffer_read is likely to block waiting
>> for data.
>
> well.. such infomation is much better communicated via a nice comment,
> rather than mystery-dead-code?
I'm doing some review of the locking in dvb core as a result of a race
condition I found earlier in the week. I'll take a look at this too
when I get a few minutes.
Devin
--
Devin J. Heitmueller
http://www.devinheitmueller.com
AIM: devinheitmueller
prev parent reply other threads:[~2009-04-30 21:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-23 17:32 Simon Arlott
2009-04-30 20:18 ` Andrew Morton
2009-04-30 21:42 ` Simon Arlott
2009-04-30 21:48 ` Andrew Morton
2009-04-30 21:54 ` Devin Heitmueller [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=412bdbff0904301454x46fb9de5hbe8f7d67da7bf887@mail.gmail.com \
--to=devin.heitmueller@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=simon@fire.lp0.eu \
/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