From: Dan Carpenter <dan.carpenter@oracle.com>
To: bojan prtvar <prtvar.b@gmail.com>
Cc: walter harms <wharms@bfs.de>,
Jussi Kivilinna <jussi.kivilinna@mbnet.fi>,
"John W. Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch 1/4 v2] rndis_wlan: integer overflows in rndis_wlan_do_link_up_work()
Date: Thu, 1 Mar 2012 15:57:40 +0300 [thread overview]
Message-ID: <20120301125739.GF22598@mwanda> (raw)
In-Reply-To: <CAOmT4fS1jnywLoiMJjewFi2-w1UHySNPCEhAbrZwW01OS1hV6w@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 825 bytes --]
On Thu, Mar 01, 2012 at 10:51:37AM +0100, bojan prtvar wrote:
> Hi,
>
>
> On Thu, Mar 1, 2012 at 8:02 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> >
> >
> >
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > ---
> > v2: Fixed a style issue for Walter Harms. Changed > 0 to != 0.
> >
>
> Why not just if (req_ie_len) and if (resp_ie_len) ?
>
It could go either way. I wrote it that way first, then I decided
that zero was a special enough case to draw attention to it. In
this case it felt like zero was its own thing.
For allocation failures I would do:
foo = kmalloc();
if (!foo)
return -ENOMEM;
Allocation failures are not interesting and the NULL doesn't have a
special meaning and doesn't need explanation.
Hard to explain.
regards,
dan carpenter
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-03-01 12:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-29 6:35 [patch 1/4] rndis_wlan: integer overflows in rndis_wlan_do_link_up_work() Dan Carpenter
2012-02-29 8:21 ` walter harms
2012-03-01 6:58 ` Dan Carpenter
2012-03-01 7:02 ` [patch 1/4 v2] " Dan Carpenter
2012-03-01 9:51 ` bojan prtvar
2012-03-01 12:57 ` Dan Carpenter [this message]
2012-03-01 10:19 ` [patch 1/4] " Jussi Kivilinna
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=20120301125739.GF22598@mwanda \
--to=dan.carpenter@oracle.com \
--cc=jussi.kivilinna@mbnet.fi \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=prtvar.b@gmail.com \
--cc=wharms@bfs.de \
/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).