[dpdk-dev] [PATCH] net/virtio: fix null pointer dereference

Yuanhan Liu yuanhan.liu at linux.intel.com
Tue Jul 5 14:14:35 CEST 2016


On Tue, Jul 05, 2016 at 11:42:59AM +0000, Jianfeng Tan wrote:
> There is a logic bug in this code, that could lead to null pointer
> dereference when cvq is NULL. Fix this problem by changing logic
> _and_ to logic _or_.
> 
>    >> CID 127480:  Null pointer dereferences  (FORWARD_NULL)
>    >> Dereferencing null pointer "cvq".
>    	if (!cvq && !cvq->vq) {
>             ...
>         }
> 
> Coverity issue: 127480
> 
> Fixes: 01ad44fd374f ("net/virtio: split Rx/Tx queue")
> 
> Signed-off-by: Jianfeng Tan <jianfeng.tan at intel.com>

Applied to dpdk-next-virtio.

Thanks.

	--yliu


More information about the dev mailing list