From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by dpdk.org (Postfix) with ESMTP id 3520623D for ; Mon, 30 Jul 2018 18:20:44 +0200 (CEST) Received: from 1.general.paelzer.uk.vpn ([10.172.196.172] helo=lap.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fkAr6-00009D-0P; Mon, 30 Jul 2018 16:17:08 +0000 From: Christian Ehrhardt To: Radu Nicolau Cc: Akhil Goyal , dpdk stable Date: Mon, 30 Jul 2018 18:12:12 +0200 Message-Id: <20180730161342.16566-87-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180730161342.16566-1-christian.ehrhardt@canonical.com> References: <20180730161342.16566-1-christian.ehrhardt@canonical.com> Subject: [dpdk-stable] patch 'security: fix crash on destroy null session' has been queued to stable release 18.05.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: Mon, 30 Jul 2018 16:20:44 -0000 Hi, FYI, your patch has been queued to stable release 18.05.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 08/01/18. So please shout if anyone has objections. Thanks. Christian Ehrhardt --- >>From 77810fbf1fce91d69c12cf3854e78df8d6f96244 Mon Sep 17 00:00:00 2001 From: Radu Nicolau Date: Thu, 5 Jul 2018 11:04:42 +0100 Subject: [PATCH] security: fix crash on destroy null session [ upstream commit 8a29f519ef1b2fdddb0324e867006c76c70173cb ] rte_security_session_destroy should return -EINVAL if session is NULL, but segfaults because of rte_mempool_from_obj(NULL) call. Fixes: c261d1431bd8 ("security: introduce security API and framework") Signed-off-by: Radu Nicolau Acked-by: Akhil Goyal --- lib/librte_security/rte_security.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/librte_security/rte_security.c b/lib/librte_security/rte_security.c index 1e559c99c..f862e9426 100644 --- a/lib/librte_security/rte_security.c +++ b/lib/librte_security/rte_security.c @@ -91,7 +91,6 @@ rte_security_session_destroy(struct rte_security_ctx *instance, struct rte_security_session *sess) { int ret; - struct rte_mempool *mp = rte_mempool_from_obj(sess); RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->session_destroy, -ENOTSUP); @@ -100,7 +99,7 @@ rte_security_session_destroy(struct rte_security_ctx *instance, ret = instance->ops->session_destroy(instance->device, sess); if (!ret) - rte_mempool_put(mp, (void *)sess); + rte_mempool_put(rte_mempool_from_obj(sess), (void *)sess); return ret; } -- 2.17.1