From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id BE62F1B519 for ; Fri, 23 Nov 2018 11:29:22 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2B4C9307D913; Fri, 23 Nov 2018 10:29:22 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F0B0179CF; Fri, 23 Nov 2018 10:29:20 +0000 (UTC) From: Kevin Traynor To: Fiona Trahe Cc: Sabyasachi Sengupta , Shally Verma , dpdk stable Date: Fri, 23 Nov 2018 10:26:28 +0000 Message-Id: <20181123102713.17309-24-ktraynor@redhat.com> In-Reply-To: <20181123102713.17309-1-ktraynor@redhat.com> References: <20181123102713.17309-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Fri, 23 Nov 2018 10:29:22 +0000 (UTC) Subject: [dpdk-stable] patch 'compressdev: fix op allocation' has been queued to stable release 18.08.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: Fri, 23 Nov 2018 10:29:23 -0000 Hi, FYI, your patch has been queued to stable release 18.08.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 11/29/18. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Kevin Traynor --- >>From d196689b3c83321988c198abc4e1f5d34e4f228e Mon Sep 17 00:00:00 2001 From: Fiona Trahe Date: Sat, 27 Oct 2018 01:43:07 +0100 Subject: [PATCH] compressdev: fix op allocation [ upstream commit 30fadd8bc9d4b550f854a5c76ee62bf02fea8b3e ] Fixed bad logic in rte_comp_op_alloc() checking return value from rte_comp_op_raw_bulk_alloc(). This could have resulted in a seg-fault in error case. Made rte_comp_ob_bulk_alloc() code consistent with rte_comp_op_alloc(). Fixes: 96086db5a369 ("compressdev: add operation management") Reported-by: Sabyasachi Sengupta Signed-off-by: Fiona Trahe Acked-by: Shally Verma --- lib/librte_compressdev/rte_comp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c index c663be595..4634c1274 100644 --- a/lib/librte_compressdev/rte_comp.c +++ b/lib/librte_compressdev/rte_comp.c @@ -175,5 +175,5 @@ rte_comp_op_alloc(struct rte_mempool *mempool) retval = rte_comp_op_raw_bulk_alloc(mempool, &op, 1); - if (unlikely(retval < 0)) + if (unlikely(retval != 1)) return NULL; @@ -187,10 +187,10 @@ rte_comp_op_bulk_alloc(struct rte_mempool *mempool, struct rte_comp_op **ops, uint16_t nb_ops) { - int ret; + int retval; uint16_t i; - ret = rte_comp_op_raw_bulk_alloc(mempool, ops, nb_ops); - if (unlikely(ret < nb_ops)) - return ret; + retval = rte_comp_op_raw_bulk_alloc(mempool, ops, nb_ops); + if (unlikely(retval != nb_ops)) + return 0; for (i = 0; i < nb_ops; i++) -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-23 10:22:54.883875540 +0000 +++ 0024-compressdev-fix-op-allocation.patch 2018-11-23 10:22:54.000000000 +0000 @@ -1,8 +1,10 @@ -From 30fadd8bc9d4b550f854a5c76ee62bf02fea8b3e Mon Sep 17 00:00:00 2001 +From d196689b3c83321988c198abc4e1f5d34e4f228e Mon Sep 17 00:00:00 2001 From: Fiona Trahe Date: Sat, 27 Oct 2018 01:43:07 +0100 Subject: [PATCH] compressdev: fix op allocation +[ upstream commit 30fadd8bc9d4b550f854a5c76ee62bf02fea8b3e ] + Fixed bad logic in rte_comp_op_alloc() checking return value from rte_comp_op_raw_bulk_alloc(). This could have resulted in a seg-fault in error case. @@ -10,7 +12,6 @@ with rte_comp_op_alloc(). Fixes: 96086db5a369 ("compressdev: add operation management") -Cc: stable@dpdk.org Reported-by: Sabyasachi Sengupta Signed-off-by: Fiona Trahe