[dpdk-dev] [PATCH] eal: fix NULL device argument pointer reference

Thomas Monjalon thomas at monjalon.net
Mon Oct 22 12:47:36 CEST 2018


22/10/2018 09:30, Thomas Monjalon:
> 22/10/2018 08:15, Qi Zhang:
> > dev->devargs is not initialized for PCI device, so use dev->bus to
> > replace dev->devargs->bus to avoid segment fault when hotplug remove
> > a PCI device.
> 
> It is not really specific to PCI device.
> The devargs is not initialized if the device is probed by default policy
> (i.e. not in blacklist).
> 
> I think we can say that "devargs is not always initialized".
> 
> > Fixes: 244d5130719c ("eal: enable hotplug on multi-process")
> > 
> > Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>

Applied with following text:

eal: fix bus name read for removal in multi-process

A crash may appear when removing some PCI devices because
dev->devargs is not always initialized. So use dev->bus instead of
dev->devargs->bus when building devargs string to remove a device.





More information about the dev mailing list