From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D80BEA0613 for ; Fri, 27 Sep 2019 22:38:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BA72E1BECB; Fri, 27 Sep 2019 22:37:59 +0200 (CEST) Received: from stargate.chelsio.com (stargate.chelsio.com [12.32.117.8]) by dpdk.org (Postfix) with ESMTP id E6ADB1BEAF; Fri, 27 Sep 2019 22:37:50 +0200 (CEST) Received: from localhost (scalar.blr.asicdesigners.com [10.193.185.94]) by stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id x8RKbgm0012972; Fri, 27 Sep 2019 13:37:43 -0700 From: Rahul Lakkireddy To: dev@dpdk.org Cc: nirranjan@chelsio.com, stable@dpdk.org Date: Sat, 28 Sep 2019 02:00:02 +0530 Message-Id: X-Mailer: git-send-email 2.5.3 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v2 02/12] net/cxgbe: fix NULL access when allocating CLIP entry X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Pass correct arguments to CLIP allocation code to avoid NULL pointer dereference. Cc: stable@dpdk.org Fixes: 3f2c1e209cfc ("net/cxgbe: add Compressed Local IP region") Signed-off-by: Rahul Lakkireddy --- v2: - No changes. 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 cc8774c1d..3b7966d04 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.18.0