[dpdk-stable] [PATCH 18.11] net/mlx5: fix crash on hash Rx queue handling for drop

Kevin Traynor ktraynor at redhat.com
Tue Dec 17 15:09:07 CET 2019


On 17/12/2019 07:26, Xiaoyu Min wrote:
> [ upstream commit 8e2f25cf3c14a9d4c4ee7cf5c6971e9fd5ad64c4 ]
> 
> When to create hrxq for the drop, it could fail on creating qp and goto
> the error handle which will release created ind_table by calling drop
> release function, which takes rte_ethdev as the only parameter and uses
> the priv->drop_queue.hrxq as input to release.
> 
> Unfortunately, at this point, the hrxq is not allocated and
> priv->drop_queue.hrxq is still NULL, which leads to a segfault.
> 
> This patch fixes the above by allocating the hrxq at first place and
> when the error happens, hrxq is released as the last one.
> 
> This patch also release other allocated resources by the correct order,
> which is missing previously.
> 
> Fixes: 78be885295b8 ("net/mlx5: handle drop queues as regular queues")
> 
> Reported-by: Zengmo Gao <gaozengmo at jd.com>
> Signed-off-by: Xiaoyu Min <jackmin at mellanox.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo at mellanox.com>

Thanks, applied to 18.11 branch.



More information about the stable mailing list