From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 8D2F22C57 for ; Thu, 1 Feb 2018 10:48:43 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 45BCE2076C; Thu, 1 Feb 2018 04:48:43 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 01 Feb 2018 04:48:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=iFQRDjiBOyNVpp3sd E08dhPoSFnATJOVA2tVm78UxgI=; b=e4uZgIQNRWkCYL6fohW7dBFMhagUwks2N GBMVw2EamhTKF1OF8UWlC8QVgC5ypMgjbw5SCQ2jRJJ8Vdj1QJBl/XOx+AhTN4l+ YhvJ6jqCLiGaG2h5G7A5EBNfrd+sdowQxPEzlQPoryPYEeC+uLPtNJG8OZOOvj09 VuC+Pk2OtP5kV2hzb70E0N8H76290lB5mV0hAcL30m+BTmsG0+WAKBF7dBwkT03U lCJTNphiKy+qEV4oqQxWXqCU/fg2pkJI8wItsOjfk18SeoJZWumzS4w1PUtsauwp pu6R+NXLpM1ofiCVKDFuoDJFRjr4ON4bDCGFVQh0GyO/ag/FIFjXQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=iFQRDjiBOyNVpp3sdE08dhPoSFnATJOVA2tVm78UxgI=; b=ZRyKUFUX xb6mReZzkvDezfvgok8iqsLO5YG2YgZU64+kkHqr30z5domO40vCdGq9OiP0/UQg jdirs07Bmo6RX9nYJuOosYG2ixIlth+K/7Gl3SbKnAVeRFm1YfN3Qe9jp7hS1omP 7Imhgfj5rAO4wC+5nZeTs+e9jH6OnnN3+LVN2jUqqiypsgWt5FdUKcaeBwRVV6Lm 8B9cuXNOOp+614Y/zzgCeBbzLBpoqY29D0gWrZ4/Dx/qixgrxHnxLpr3jW06f5AS GUUo1Hyzyki+a+uWfeCEJ/7kuGQ0t1HzdhFN+0DeN+OTCBYa3Ed+Z54bc2iz/h1S yesdivgy6AsFhQ== X-ME-Sender: Received: from yliu-mob.mtl.com (unknown [115.150.27.200]) by mail.messagingengine.com (Postfix) with ESMTPA id 063BA245F1; Thu, 1 Feb 2018 04:48:40 -0500 (EST) From: Yuanhan Liu To: Yong Wang Cc: Wenzhuo Lu , dpdk stable Date: Thu, 1 Feb 2018 17:47:29 +0800 Message-Id: <1517478479-12417-15-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517478479-12417-1-git-send-email-yliu@fridaylinux.org> References: <1517478479-12417-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/e1000: fix null pointer check' has been queued to LTS release 17.11.1 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: Thu, 01 Feb 2018 09:48:43 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/03/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 76f8876e860971cbfd1792fd79e388bcde7f265a Mon Sep 17 00:00:00 2001 From: Yong Wang Date: Thu, 25 Jan 2018 02:43:04 -0500 Subject: [PATCH] net/e1000: fix null pointer check [ upstream commit 516e525ebfcf9875c86eb5ce88a536470e279739 ] There are several func calls to rte_zmalloc() which don't have null pointer check for the return value. It fixes that by adding null pointer check. Fixes: 22bb13410cb2 ("net/igb: create consistent filter") Signed-off-by: Yong Wang Acked-by: Wenzhuo Lu --- drivers/net/e1000/igb_flow.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/net/e1000/igb_flow.c b/drivers/net/e1000/igb_flow.c index 22bad26..057579b 100644 --- a/drivers/net/e1000/igb_flow.c +++ b/drivers/net/e1000/igb_flow.c @@ -1345,6 +1345,11 @@ igb_flow_create(struct rte_eth_dev *dev, if (!ret) { ntuple_filter_ptr = rte_zmalloc("igb_ntuple_filter", sizeof(struct igb_ntuple_filter_ele), 0); + if (!ntuple_filter_ptr) { + PMD_DRV_LOG(ERR, "failed to allocate memory"); + goto out; + } + rte_memcpy(&ntuple_filter_ptr->filter_info, &ntuple_filter, sizeof(struct rte_eth_ntuple_filter)); @@ -1367,6 +1372,11 @@ igb_flow_create(struct rte_eth_dev *dev, ethertype_filter_ptr = rte_zmalloc( "igb_ethertype_filter", sizeof(struct igb_ethertype_filter_ele), 0); + if (!ethertype_filter_ptr) { + PMD_DRV_LOG(ERR, "failed to allocate memory"); + goto out; + } + rte_memcpy(ðertype_filter_ptr->filter_info, ðertype_filter, sizeof(struct rte_eth_ethertype_filter)); @@ -1387,6 +1397,11 @@ igb_flow_create(struct rte_eth_dev *dev, if (!ret) { syn_filter_ptr = rte_zmalloc("igb_syn_filter", sizeof(struct igb_eth_syn_filter_ele), 0); + if (!syn_filter_ptr) { + PMD_DRV_LOG(ERR, "failed to allocate memory"); + goto out; + } + rte_memcpy(&syn_filter_ptr->filter_info, &syn_filter, sizeof(struct rte_eth_syn_filter)); @@ -1408,6 +1423,11 @@ igb_flow_create(struct rte_eth_dev *dev, if (!ret) { flex_filter_ptr = rte_zmalloc("igb_flex_filter", sizeof(struct igb_flex_filter_ele), 0); + if (!flex_filter_ptr) { + PMD_DRV_LOG(ERR, "failed to allocate memory"); + goto out; + } + rte_memcpy(&flex_filter_ptr->filter_info, &flex_filter, sizeof(struct rte_eth_flex_filter)); -- 2.7.4