[dpdk-stable] patch 'compressdev: fix op allocation' has been queued to stable release 18.08.1
Kevin Traynor
ktraynor at redhat.com
Fri Nov 23 11:26:28 CET 2018
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 <fiona.trahe at intel.com>
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 <sabyasg at hpe.com>
Signed-off-by: Fiona Trahe <fiona.trahe at intel.com>
Acked-by: Shally Verma <shally.verma at caviumnetworks.com>
---
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 <fiona.trahe at intel.com>
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 at dpdk.org
Reported-by: Sabyasachi Sengupta <sabyasg at hpe.com>
Signed-off-by: Fiona Trahe <fiona.trahe at intel.com>
More information about the stable
mailing list