[dpdk-dev] [PATCH] pci: fix parsing of address without function number

Thomas Monjalon thomas at monjalon.net
Tue Nov 13 18:00:17 CET 2018


12/11/2018 10:29, Gaëtan 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.
> > 
> > This bug has always been there in older parsing macros:
> > 	- GET_PCIADDR_FIELD
> > 	- GET_BLACKLIST_FIELD
> > 
> 
> Returning 0, that's understandable, but errno not being set
> is rather lame from strtoul.
> 
> > Fixes: af75078fece3 ("first public release")
> > Cc: stable at dpdk.org
> > 
> > Reported-by: Wisam Jaddo <wisamm at mellanox.com>
> > Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
> Acked-by: Gaetan Rivet <gaetan.rivet at 6wind.com>

Applied





More information about the dev mailing list