net/cxgbe: fix null access when allocating CLIP entry
authorRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Fri, 27 Sep 2019 20:30:02 +0000 (02:00 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 7 Oct 2019 13:00:57 +0000 (15:00 +0200)
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 <rahul.lakkireddy@chelsio.com>
drivers/net/cxgbe/cxgbe_filter.c

index cc8774c..3b7966d 100644 (file)
@@ -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;
        }