From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
Johannes Berg <johannes.berg@intel.com>,
Jiri Kosina <jkosina@suse.cz>,
Lucas De Marchi <lucas.demarchi@profusion.mobi>,
linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] ipw2x00: signedness bug handling frame length
Date: Fri, 13 Jan 2012 10:29:09 +0000 [thread overview]
Message-ID: <20120113102908.GB2214@redhat.com> (raw)
In-Reply-To: <20120112063449.GA2408@elgon.mountain>
On Thu, Jan 12, 2012 at 09:34:50AM +0300, Dan Carpenter wrote:
> This is basically just a cleanup. Large positive numbers get counted as
> negative but then get implicitly cast to positive again for the checks
> that matter.
>
> This does make a small difference in ipw_handle_promiscuous_rx() when we
> test "if (unlikely((len + IPW_RX_FRAME_SIZE) > skb_tailroom(rxb->skb)))"
> It should return there, but we don't return until a couple lines later
> when we test "if (len > IPW_RX_BUF_SIZE - sizeof(struct ipw_rt_hdr)) {".
> The difference is that in the second test the sizeof() means that there
> is an implied cast to unsigned.
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Not sure if making it "unsinged int" would be better, but this change is
fine to me as is too.
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
next prev parent reply other threads:[~2012-01-13 10:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-12 6:34 [patch] ipw2x00: signedness bug handling frame length Dan Carpenter
2012-01-13 10:29 ` Stanislaw Gruszka [this message]
2012-01-13 10:36 ` 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=20120113102908.GB2214@redhat.com \
--to=sgruszka@redhat.com \
--cc=dan.carpenter@oracle.com \
--cc=jkosina@suse.cz \
--cc=johannes.berg@intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=lucas.demarchi@profusion.mobi \
/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