[dpdk-dev] [PATCH v3] net/mlx5: fix possible NULL deref in Rx path

2016-09-19 Thread Bruce Richardson
On Tue, Aug 02, 2016 at 05:41:21PM +0300, Sagi Grimberg wrote: > The user is allowed to call ->rx_pkt_burst() even without free > mbufs in the pool. In this scenario we'll fail allocating a rep mbuf > on the first iteration (where pkt is still NULL). This would cause us > to deref a NULL pkt (reset

[dpdk-dev] [PATCH v3] net/mlx5: fix possible NULL deref in Rx path

2016-08-02 Thread Sagi Grimberg
The user is allowed to call ->rx_pkt_burst() even without free mbufs in the pool. In this scenario we'll fail allocating a rep mbuf on the first iteration (where pkt is still NULL). This would cause us to deref a NULL pkt (reset refcount and free). Fix this by checking the pkt before freeing it.