From 41b5a4a655b07680b355f3e518380a73b4c03f65 Mon Sep 17 00:00:00 2001 From: Rahul Lakkireddy Date: Sat, 28 Sep 2019 02:00:02 +0530 Subject: [PATCH] net/cxgbe: fix null access when allocating CLIP entry Pass correct arguments to CLIP allocation code to avoid NULL pointer dereference. Fixes: 3f2c1e209cfc ("net/cxgbe: add Compressed Local IP region") Cc: stable@dpdk.org Signed-off-by: Rahul Lakkireddy --- drivers/net/cxgbe/cxgbe_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/cxgbe/cxgbe_filter.c b/drivers/net/cxgbe/cxgbe_filter.c index cc8774c1db..3b7966d045 100644 --- a/drivers/net/cxgbe/cxgbe_filter.c +++ b/drivers/net/cxgbe/cxgbe_filter.c @@ -1052,7 +1052,7 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id, */ if (chip_ver > CHELSIO_T5 && fs->type && memcmp(fs->val.lip, bitoff, sizeof(bitoff))) { - f->clipt = cxgbe_clip_alloc(f->dev, (u32 *)&f->fs.val.lip); + f->clipt = cxgbe_clip_alloc(dev, (u32 *)&fs->val.lip); if (!f->clipt) goto free_tid; } -- 2.20.1