From: Florian Fainelli Date: Tue, 19 Jan 2021 17:14:03 +0000 Subject: Re: [PATCH net] net: dsa: b53: fix an off by one in checking "vlan->vid" Message-Id: <44c35bd8-b7c3-49be-3a67-e9b1c8a02617@gmail.com> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Dan Carpenter Cc: Andrew Lunn , Vivien Didelot , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, kernel-janitors@vger.kernel.org On 1/19/2021 6:48 AM, Dan Carpenter wrote: > The > comparison should be >= to prevent accessing one element beyond > the end of the dev->vlans[] array in the caller function, b53_vlan_add(). > The "dev->vlans" array is allocated in the b53_switch_init() function > and it has "dev->num_vlans" elements. > > Fixes: a2482d2ce349 ("net: dsa: b53: Plug in VLAN support") > Signed-off-by: Dan Carpenter Acked-by: Florian Fainelli -- Florian