From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] pci: fix parsing of address without function number Date: Tue, 13 Nov 2018 18:00:17 +0100 Message-ID: <3033024.8sQED2Sm3S@xps> References: <20181111235856.31429-1-thomas@monjalon.net> <20181112092905.g5vxszu5okxz4pzn@bidouze.vm.6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org, wisamm@mellanox.com, stable@dpdk.org To: =?ISO-8859-1?Q?Ga=EBtan?= Rivet Return-path: In-Reply-To: <20181112092905.g5vxszu5okxz4pzn@bidouze.vm.6wind.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 12/11/2018 10:29, Ga=EBtan Rivet: > On Mon, Nov 12, 2018 at 12:58:56AM +0100, Thomas Monjalon wrote: > > If the last part of the PCI address (function number) is missing, > > the parsing was successful, assuming function 0. > > The call to strtoul is not returning an error in such a case, > > so an explicit check is inserted before. > >=20 > > This bug has always been there in older parsing macros: > > - GET_PCIADDR_FIELD > > - GET_BLACKLIST_FIELD > >=20 >=20 > Returning 0, that's understandable, but errno not being set > is rather lame from strtoul. >=20 > > Fixes: af75078fece3 ("first public release") > > Cc: stable@dpdk.org > >=20 > > Reported-by: Wisam Jaddo > > Signed-off-by: Thomas Monjalon > Acked-by: Gaetan Rivet Applied