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 D408E4D3A for ; Thu, 1 Feb 2018 10:48:22 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8BF8F209CA; Thu, 1 Feb 2018 04:48:22 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 01 Feb 2018 04:48:22 -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=AdUSobuDWDgq+C0nk yaCrhZOjXyKzwxEyjzvvOJVFU4=; b=Yju4MiLnSF3cyW4iPrU33A7c4vtzQYkC5 P0Dno2jpsO+tyxK3Eun5LhbrVdATVRWYYMQ/cto/Mq6z0OuXGEU8LVWQjvUK1dSG ikeopsZPFD34gTpQJ1t5GhmZJzHypy2MkmKLanmP/pJlE0i0PP3K66rDob3XmCM2 m0Ondes34E600fugU5qX9LoPzuS5Gz2NQiV/3io73sGKPDG/nKaXZkkqjHPSFBke jnCNDDqQOMB+BEXSJ/N3U5kO8VBu1r3xxGeiNrkPNSghxi58BKvNAkQi/Sx1mo0U 3dBQfnqLm/uHg50MRHaCCUWyYPwlqEkeVNq3zsL4d2F+G+xTEqqpw== 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=AdUSobuDWDgq+C0nkyaCrhZOjXyKzwxEyjzvvOJVFU4=; b=mVC4sqGj bgx7twh0AXOOCjlBHyLDeRodM/l4b4VNhtUZjTAEydwMj/Ug0pytwDoGpDA9jASj WbSCcGx6zwJDGrCoNvbVIfRFB0AJQiAV/No7l846xdMu8tm/KJluIB4EI4ihaU2S 7s7p87gdFHKqKQhcYF9seBCBzbP52ec5ZvMIfak0px93YDyyGNHoUKl3t5nqz/8p YdBITj1ea1cvhCCtM++US2braxKXd86g95m/AESYcDDCHGCOurNp1+7wHTPtrHP9 2zWBFZH1QSg7JqHE53MnA6NxaCGykvRkOJzlyOkHMtF06/iIJ1/zeXGibtnrd3IO qxnqyzmcgtX0aw== X-ME-Sender: Received: from yliu-mob.mtl.com (unknown [115.150.27.200]) by mail.messagingengine.com (Postfix) with ESMTPA id 9BA1624610; Thu, 1 Feb 2018 04:48:20 -0500 (EST) From: Yuanhan Liu To: Olivier Matz Cc: Keith Wiles , dpdk stable Date: Thu, 1 Feb 2018 17:47:22 +0800 Message-Id: <1517478479-12417-8-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 'mbuf: fix NULL freeing when debug enabled' 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:23 -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 09c8e4abb5d7f95bf4b5bfde19d34e8f067134a7 Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Mon, 29 Jan 2018 10:39:23 +0100 Subject: [PATCH] mbuf: fix NULL freeing when debug enabled [ upstream commit 9f8d9b2ee358c496fe206d1e6f111067afd501b3 ] Do not panic when calling rte_pktmbuf_free(NULL) with mbuf debug enabled, it is a valid operation. Fixes: af75078fece3 ("first public release") Reported-by: Keith Wiles Signed-off-by: Olivier Matz --- lib/librte_mbuf/rte_mbuf.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index bf85124..16a6048 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -1427,13 +1427,14 @@ rte_pktmbuf_free_seg(struct rte_mbuf *m) * segment is added back into its original mempool. * * @param m - * The packet mbuf to be freed. + * The packet mbuf to be freed. If NULL, the function does nothing. */ static inline void rte_pktmbuf_free(struct rte_mbuf *m) { struct rte_mbuf *m_next; - __rte_mbuf_sanity_check(m, 1); + if (m != NULL) + __rte_mbuf_sanity_check(m, 1); while (m != NULL) { m_next = m->next; -- 2.7.4