Hi, > -----Original Message----- > From: dev <dev-boun...@dpdk.org> On Behalf Of Xiaoyu Min > Sent: Thursday, October 17, 2019 1:50 PM > To: Shahaf Shuler <shah...@mellanox.com>; Yongseok Koh > <ys...@mellanox.com> > Cc: dev@dpdk.org; sta...@dpdk.org; Zengmo Gao <gaozen...@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: sta...@dpdk.org > > Reported-by: Zengmo Gao <gaozen...@jd.com> > Signed-off-by: Xiaoyu Min <jack...@mellanox.com> > ---
Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh