[dpdk-dev] [PATCH] virtio: check if devargs is NULL before checking its value

Yuanhan Liu yuanhan.liu at linux.intel.com
Fri May 27 04:09:43 CEST 2016


On Wed, May 25, 2016 at 12:47:30PM +0200, Thomas Monjalon wrote:
> > -		    dev->devargs->type != RTE_DEVTYPE_WHITELISTED_PCI) {
> > +		    (!dev->devargs ||
> > +		     dev->devargs->type != RTE_DEVTYPE_WHITELISTED_PCI)) {
> 
> Should the title be something like "fix crash ..."?
> 
> I would also add
> Reported-by: Vincent Li <vincent.mc.li at gmail.com>

Huawei, the two are good comments (Thomas, thanks for the review, BTW :).

So, mind to send v2? BTW, I think this patch deserves some explanation,
say, why dev->devargs could be NULL.



	--yliu


More information about the dev mailing list