From: "Levin, Alexander" <alexander.levin@verizon.com>
To: Sunil Kovvuri <sunil.kovvuri@gmail.com>,
"Levin, Alexander" <alexander.levin@verizon.com>
Cc: "sgoutham@cavium.com" <sgoutham@cavium.com>,
"rric@kernel.org" <rric@kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net: thunderx: correct bound check in nic_config_loopback
Date: Mon, 1 Aug 2016 11:57:58 -0400 [thread overview]
Message-ID: <6b86fd8a-e97a-8b71-1786-50aa9e667873@verizon.com> (raw)
In-Reply-To: <CA+sq2Cc-MTtoncAcL6MS-YVdeVVK=aqEmZakzkX6_CwsXvpRCQ@mail.gmail.com>
On 07/31/2016 12:41 PM, Sunil Kovvuri wrote:
> Thanks for finding.
> A much better fix would be,
>
> - if (lbk->vf_id > MAX_LMAC)
> + if (lbk->vf_id >= nic->num_vf_en)
> return -1;
>
> where 'num_vf_en' reflects the exact number of physical interfaces or
> LMACs on the system.
Right. I see quite a few more places that compare to MAX_LMAC vs
num_vf_en. What was the reasoning behind it then?
Thanks,
Sasha
next prev parent reply other threads:[~2016-08-01 16:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-31 2:49 Levin, Alexander
2016-07-31 9:52 ` Sergei Shtylyov
2016-07-31 16:41 ` Sunil Kovvuri
2016-08-01 15:57 ` Levin, Alexander [this message]
2016-08-02 11:32 ` Sunil Kovvuri
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=6b86fd8a-e97a-8b71-1786-50aa9e667873@verizon.com \
--to=alexander.levin@verizon.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rric@kernel.org \
--cc=sgoutham@cavium.com \
--cc=sunil.kovvuri@gmail.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
all inboxes | Powered by JetHome®