[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+sq2Cc-MTtoncAcL6MS-YVdeVVK=aqEmZakzkX6_CwsXvpRCQ@mail.gmail.com>
Date: Mon, 1 Aug 2016 00:41:52 +0800
From: Sunil Kovvuri <sunil.kovvuri@...il.com>
To: "Levin, Alexander" <alexander.levin@...izon.com>
Cc: "sgoutham@...ium.com" <sgoutham@...ium.com>,
"rric@...nel.org" <rric@...nel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: thunderx: correct bound check in nic_config_loopback
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.
Thanks,
Sunil.
Powered by blists - more mailing lists