From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 04763A04A8; Tue, 25 Jan 2022 05:13:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 75D0542809; Tue, 25 Jan 2022 05:13:03 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 2FFB64013F; Tue, 25 Jan 2022 05:13:02 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20P2epfx025149; Mon, 24 Jan 2022 20:13:01 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=dvvmiUqR8FgfX8zUA8wdlgCdbFl2A+0IVAJMJkGrB1Q=; b=kUY3pv7ld66ZSi3LeVQV52INAzPHT8f2pSBpuCFmn3BwWDdHiMcf1/Oof345L1Jc7nl1 cjCLHLJTjlHIWPPqdu0FMx0Q4XrX5GtstD2HzZ1Pp1b1udyZi0WhK+/EfxWGnfgfBX2K q5Q5vJ+TgxeLA1FXO/OLkSo8vxwImhN3mTwCksnBbhbAkpTnzBk7HNdXx1EEn5Hc6rS4 TO7VOcugcbF3pOrzoZ6PVk6s4JI9IWNlZR9KBNwXOJd4gImE95SrLFYrMWSmoyLWZEyg wB2/DNdjkoZ5YuucUSUw2eLO5TYF7aiSWQSbIyl/C2tc/6px2+cyUwx21iKVWzmGR2qp Ew== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3dt8mug7mq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 24 Jan 2022 20:13:01 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 24 Jan 2022 20:12:59 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 24 Jan 2022 20:12:59 -0800 Received: from localhost.localdomain (unknown [10.28.34.33]) by maili.marvell.com (Postfix) with ESMTP id 8462C5E6865; Mon, 24 Jan 2022 20:12:56 -0800 (PST) From: To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , Satheesh Paul , , Jerin Jacob Kollanukkaran Subject: [dpdk-dev] [PATCH] common/cnxk: fix missing null check in IPv6 flow parsing Date: Tue, 25 Jan 2022 09:42:48 +0530 Message-ID: <20220125041248.905732-1-psatheesh@marvell.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: fX6H5xPQB86_wvpZB8iCpTd12k7gNNUO X-Proofpoint-GUID: fX6H5xPQB86_wvpZB8iCpTd12k7gNNUO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-25_01,2022-01-24_02,2021-12-02_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Satheesh Paul Added null check in IPv6 flow pattern parsing. Fixes: a55dc02af5 ("common/cnxk: support extensions attributes in IPv6 item") Cc: stable@dpdk.org Signed-off-by: Satheesh Paul Reviewed-by: Jerin Jacob Kollanukkaran --- drivers/common/cnxk/roc_npc_parse.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/common/cnxk/roc_npc_parse.c b/drivers/common/cnxk/roc_npc_parse.c index 1f21693369..302ab66efc 100644 --- a/drivers/common/cnxk/roc_npc_parse.c +++ b/drivers/common/cnxk/roc_npc_parse.c @@ -562,9 +562,11 @@ npc_parse_lc(struct npc_parse_state *pst) ipv6_spec = pst->pattern->spec; lid = NPC_LID_LC; lt = NPC_LT_LC_IP6; - rc = npc_handle_ipv6ext_attr(ipv6_spec, pst, &flags); - if (rc) - return rc; + if (ipv6_spec) { + rc = npc_handle_ipv6ext_attr(ipv6_spec, pst, &flags); + if (rc) + return rc; + } info.len = sizeof(ipv6_spec->hdr); break; case ROC_NPC_ITEM_TYPE_ARP_ETH_IPV4: -- 2.25.4