From: Trent Piepho <xyzzy@speakeasy.org>
To: Markus Rechberger <mrechberger@gmail.com>
Cc: Manu Abraham <abraham.manu@gmail.com>,
v4l-dvb-maintainer@linuxtv.org, linux-kernel@vger.kernel.org,
Adrian Bunk <bunk@stusta.de>
Subject: Re: [v4l-dvb-maintainer] [2.6 patch] dvb_frontend_ioctl(): fix check-after-use
Date: Fri, 10 Aug 2007 16:19:12 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.58.0708101546170.26791@shell4.speakeasy.net> (raw)
In-Reply-To: <d9def9db0708101047u27c939a4ve57b28cf4319aaf2@mail.gmail.com>
On Fri, 10 Aug 2007, Markus Rechberger wrote:
> On 8/1/07, Manu Abraham <abraham.manu@gmail.com> wrote:
> > On 7/31/07, Adrian Bunk <bunk@stusta.de> wrote:
> > > The Coverity checker spotted that we have already oops'ed if "fe" was
> > NULL.
> > >
> > > --- linux-2.6.23-rc1-mm1/drivers/media/dvb/dvb-core/dvb_frontend.c.old
> > > +++ linux-2.6.23-rc1-mm1/drivers/media/dvb/dvb-core/dvb_frontend.c
> > > @@ -706,11 +706,11 @@ static int dvb_frontend_ioctl(struct ino
> > > - if (!fe || fepriv->exit)
> > > + if (fepriv->exit)
> > > return -ENODEV;
>
> This issue has been known for a while including some other problems at
> that part.
>
> http://article.gmane.org/gmane.linux.drivers.dvb/35351/match=patch+dvb_net+hotplugging+support
>
> this includes a link where this and more got discussed in May.
For dvb_net_close, I like the patch I already posted better. To fix the
check-after-use, it's not "use" part that's the problem, it's the "check" part
that isn't necessary.
I traced the dvb-net code, http://article.gmane.org/gmane.linux.kernel/543689,
and I'm sure that dvbdev can't be NULL.
My patch also deletes a few pieces of duplicated code by calling
dvb_generic_release().
The only problem is that practically no one uses dvb-net, so it's very hard to
test these patches.
In all the dvb code, were is the locking for device open and release? I don't
see it. What is preventing two threads from trying to open and/or close the
same dvb device at the same time?
next prev parent reply other threads:[~2007-08-10 23:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-30 22:28 Adrian Bunk
2007-08-01 3:52 ` Manu Abraham
2007-08-10 17:47 ` [v4l-dvb-maintainer] " Markus Rechberger
2007-08-10 23:19 ` Trent Piepho [this message]
2007-08-11 11:13 ` Markus Rechberger
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=Pine.LNX.4.58.0708101546170.26791@shell4.speakeasy.net \
--to=xyzzy@speakeasy.org \
--cc=abraham.manu@gmail.com \
--cc=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mrechberger@gmail.com \
--cc=v4l-dvb-maintainer@linuxtv.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®