From: Brendan Burns <bburns@cs.umass.edu>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] [PATCH][revised] : request_region auditing
Date: Mon, 02 Apr 2007 19:57:56 +0000 [thread overview]
Message-ID: <1175543876.2944.6.camel@localhost.localdomain> (raw)
In-Reply-To: <1175450907.3396.6.camel@localhost.localdomain>
Hey Dan,
thanks for the patience and the comments.
In this patch, though, I have a question.
> > --- linux-2.6.20.4.orig/drivers/net/hamradio/scc.c 2007-03-31
> > 22:29:44.000000000 -0400
> > +++ linux-2.6.20.4/drivers/net/hamradio/scc.c 2007-03-31
> > 22:30:44.000000000 -0400
> > @@ -1808,8 +1808,10 @@ static int scc_net_ioctl(struct net_devi
> >
> > if (found)
> > {
> > - request_region(SCC_Info[2*Nchips+chan].ctrl, 1, "scc ctrl");
> > - request_region(SCC_Info[2*Nchips+chan].data, 1, "scc data");
> > + if (!request_region(SCC_Info[2*Nchips+chan].ctrl, 1, "scc ctrl"))
> > + return -EBUSY;
> > + if (!request_region(SCC_Info[2*Nchips+chan].data, 1, "scc data"))
> > + return -EBUSY;
> > if (Nchips+chan != 0 &&
> > scc_net_alloc(device_name,
> > &SCC_Info[2*Nchips+chan]))
> > return -EINVAL;
> If the first request succeeds and the second request fails it needs to clean up.
The last line in the "if (Nchips+chan ...)" after my patch returns
-EINVAL without cleaning up the request_regions. Is this incorrect also?
Note that this is the way the original code is written. I'm happy to
fix up this bug too, I just wanted to verify that it was in fact a bug.
(I'll fix the other two patches and send another patch)
Thanks again for your assistance and patience.
--brendan
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors
next prev parent reply other threads:[~2007-04-02 19:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-01 18:08 [KJ] [PATCH][revised] : request_region auditing Brendan Burns
2007-04-02 19:57 ` Brendan Burns [this message]
2007-04-02 20:35 ` Dan Carpenter
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=1175543876.2944.6.camel@localhost.localdomain \
--to=bburns@cs.umass.edu \
--cc=kernel-janitors@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.