From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: Re: [oss-drivers] [PATCH][V2] nfp: check idx is -ENOSPC before using it is an index Date: Mon, 11 Jul 2016 16:59:43 +0100 Message-ID: <20160711165943.09c3c519@jkicinski-Precision-T1700> References: <1468252460-15117-1-git-send-email-colin.king@canonical.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Lauro Ramos Venancio , Aloisio Almeida Jr , Samuel Ortiz , "David S . Miller" , Rolf Neugebauer , Christophe Ricard , Robert Dolca , oss-drivers-wFxRvT7yatFl57MIdRCFDg@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Colin King Return-path: In-Reply-To: <1468252460-15117-1-git-send-email-colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org> Sender: linux-wireless-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org On Mon, 11 Jul 2016 16:54:20 +0100, Colin King wrote: > From: Colin Ian King > > idx can be returned as -ENOSPC, so we should check for this first > before using it as an index into nn->vxlan_usecnt[] to avoid an > out of bounds array offset read. > > Signed-off-by: Colin Ian King Acked-by: Jakub Kicinski Thanks! -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html