From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 016BF1B144; Wed, 5 Dec 2018 05:29:40 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Dec 2018 20:29:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,316,1539673200"; d="scan'208";a="107380104" Received: from dpdk-qiming2.sh.intel.com ([10.67.119.132]) by orsmga003.jf.intel.com with ESMTP; 04 Dec 2018 20:29:38 -0800 From: Qiming Yang To: dev@dpdk.org Cc: Qiming Yang , stable@dpdk.org Date: Wed, 5 Dec 2018 19:55:31 +0800 Message-Id: <20181205115531.17073-1-qiming.yang@intel.com> X-Mailer: git-send-email 2.9.5 Subject: [dpdk-stable] [PATCH] lib: add warning for NULL pointer X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Dec 2018 04:29:41 -0000 May return NULL when manage tries for packet in acl library. So this patch added warning for the NULL pointer return. Fixes: 074f54ad03ee ("acl: fix build and runtime for default target") Cc: stable@dpdk.org Signed-off-by: Qiming Yang --- lib/librte_acl/acl_run.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/librte_acl/acl_run.h b/lib/librte_acl/acl_run.h index bf7842d..6c718c0 100644 --- a/lib/librte_acl/acl_run.h +++ b/lib/librte_acl/acl_run.h @@ -143,6 +143,9 @@ acl_start_next_trie(struct acl_flow_data *flows, struct parms *parms, int n, flows->num_packets * flows->categories); } + if (flows->last_cmplt == NULL) + RTE_LOG(WARNING, MALLOC, "packet tries allocate failed"); + /* set completion parameters and starting index for this slot */ parms[n].cmplt = flows->last_cmplt; transition = -- 2.9.5