From: Rahul Lakkireddy Date: Fri, 27 Sep 2019 20:30:02 +0000 (+0530) Subject: net/cxgbe: fix null access when allocating CLIP entry X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=41b5a4a655b07680b355f3e518380a73b4c03f65;p=dpdk.git 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 --- 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; }