From: Ben Dooks <ben-linux@fluff.org>
To: "Randy.Dunlap" <rdunlap@xenotime.net>
Cc: Ben Dooks <ben-linux@fluff.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] release_resource() check for NULL resource
Date: Mon, 3 Oct 2005 10:48:03 +0100 [thread overview]
Message-ID: <20051003094803.GC3500@home.fluff.org> (raw)
In-Reply-To: <20051002103922.34dd287d.rdunlap@xenotime.net>
On Sun, Oct 02, 2005 at 10:39:22AM -0700, Randy.Dunlap wrote:
> On Sun, 2 Oct 2005 18:03:18 +0100 Ben Dooks wrote:
>
> > If release_resource() is passed a NULL resource
> > the kernel will OOPS.
>
> does this actually happen? you are fixing a real oops?
> if so, what driver caused it?
I was developing a couple of new drivers, and found
that this does not behave like kfree() which does check
for NULL paramemters. I belive it would be helpful if
functions like this followed the example of kfree().
> btw, please use diff -p also (as in Documentation/SubmittingPatches)
>
>
> > Signed-off-by: Ben Dooks <ben-linux@fluff.org>
> >
> > diff -urN -X ../dontdiff linux-2.6.14-rc3/kernel/resource.c linux-2.6.14-rc3-bjd1/kernel/resource.c
> > --- linux-2.6.14-rc3/kernel/resource.c 2005-10-02 12:58:03.000000000 +0100
> > +++ linux-2.6.14-rc3-bjd1/kernel/resource.c 2005-10-02 17:58:09.000000000 +0100
> > @@ -181,6 +181,9 @@
> > {
> > struct resource *tmp, **p;
> >
> > + if (!old)
> > + return 0;
> > +
> > p = &old->parent->child;
> > for (;;) {
> > tmp = *p;
--
Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
next prev parent reply other threads:[~2005-10-03 9:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-02 17:03 [PATCH] release_resource() check for NULL resource Ben Dooks
2005-10-02 17:39 ` Randy.Dunlap
2005-10-03 9:48 ` Ben Dooks [this message]
2005-10-03 9:59 ` Jesper Juhl
2005-10-03 10:04 ` Russell King
2005-10-03 12:43 ` Pekka Enberg
2005-10-03 12:49 ` Russell King
2005-10-03 12:54 ` Pekka J Enberg
2005-10-03 13:00 ` Russell King
2005-10-03 13:12 ` Pekka J Enberg
2005-10-03 13:42 ` Russell King
2005-10-03 13:42 ` Al Viro
2005-10-03 14:57 ` Pekka Enberg
2005-10-04 2:15 ` Randy.Dunlap
[not found] ` <5dc44ec70510031959w1f4adfcbh395535ade34a357d@mail.gmail.com>
2005-10-04 3:00 ` Diego de Estrada
2005-10-04 3:28 ` Randy.Dunlap
[not found] <4TfvY-8ix-27@gated-at.bofh.it>
[not found] ` <4Tg8u-Bn-15@gated-at.bofh.it>
[not found] ` <4Tv7u-5Hd-15@gated-at.bofh.it>
[not found] ` <4TvB0-6wD-3@gated-at.bofh.it>
[not found] ` <4TvB7-6wD-5@gated-at.bofh.it>
[not found] ` <4TxWv-1xD-37@gated-at.bofh.it>
2005-10-04 22:31 ` Bodo Eggert
2005-10-05 9:06 ` Russell King
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=20051003094803.GC3500@home.fluff.org \
--to=ben-linux@fluff.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@xenotime.net \
/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;
as well as URLs for NNTP newsgroup(s).