[dpdk-dev] [PATCH] net/mlx5: fix segfault when create hash rxq of drop

Raslan Darawsheh rasland at mellanox.com
Mon Oct 21 14:04:39 CEST 2019


Hi,

> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Xiaoyu Min
> Sent: Thursday, October 17, 2019 1:50 PM
> To: Shahaf Shuler <shahafs at mellanox.com>; Yongseok Koh
> <yskoh at mellanox.com>
> Cc: dev at dpdk.org; stable at dpdk.org; Zengmo Gao <gaozengmo at jd.com>
> Subject: [dpdk-dev] [PATCH] net/mlx5: fix segfault when create hash rxq of
> drop
> 
> 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")
> Cc: stable at dpdk.org
> 
> Reported-by: Zengmo Gao <gaozengmo at jd.com>
> Signed-off-by: Xiaoyu Min <jackmin at mellanox.com>
> ---


Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh


More information about the dev mailing list