From: David Miller <davem@davemloft.net>
To: dan.carpenter@oracle.com
Cc: sam@mendozajonas.com, netdev@vger.kernel.org,
gwshan@linux.vnet.ibm.com, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] net/ncsi: prevent a couple array underflows
Date: Thu, 17 May 2018 16:28:07 -0400 (EDT) [thread overview]
Message-ID: <20180517.162807.2024433602650608102.davem@davemloft.net> (raw)
In-Reply-To: <20180517123336.GB7655@mwanda>
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 17 May 2018 15:33:36 +0300
> We recently refactored this code and introduced a static checker
> warning. Smatch complains that if cmd->index is zero then we would
> underflow the arrays. That's obviously true.
>
> The question is whether we prevent cmd->index from being zero at a
> different level. I've looked at the code and I don't immediately see
> a check for that.
>
> Fixes: 062b3e1b6d4f ("net/ncsi: Refactor MAC, VLAN filters")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied to net-next, thanks Dan.
prev parent reply other threads:[~2018-05-17 20:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-17 12:33 [PATCH] net/ncsi: prevent a couple array underflows Dan Carpenter
2018-05-17 20:28 ` David Miller [this message]
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=20180517.162807.2024433602650608102.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dan.carpenter@oracle.com \
--cc=gwshan@linux.vnet.ibm.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sam@mendozajonas.com \
/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).