From: Andrew Morton <akpm@linux-foundation.org>
To: Simon Arlott <simon@fire.lp0.eu>
Cc: 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 14:48:40 -0700 [thread overview]
Message-ID: <20090430144840.6605e564.akpm@linux-foundation.org> (raw)
In-Reply-To: <49FA1B2E.8030402@simon.arlott.org.uk>
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?
next prev parent reply other threads:[~2009-04-30 21:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-23 17:32 [PATCH] dvb-core: Fix potential mutex_unlock without mutex_lock in dvb_dvr_read Simon Arlott
2009-04-30 20:18 ` Andrew Morton
2009-04-30 21:42 ` Simon Arlott
2009-04-30 21:48 ` Andrew Morton [this message]
2009-04-30 21:54 ` Devin Heitmueller
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=20090430144840.6605e564.akpm@linux-foundation.org \
--to=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