patch 'baseband/acc100: add protection for some negative scenario' has been queued to stable release 20.11.6
Xueming Li
xuemingl at nvidia.com
Wed Jul 20 10:20:35 CEST 2022
Hi,
FYI, your patch has been queued to stable release 20.11.6
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/22/22. 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. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/437389abd9170b9792966555653e9806c41cd453
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From 437389abd9170b9792966555653e9806c41cd453 Mon Sep 17 00:00:00 2001
From: Nicolas Chautru <nicolas.chautru at intel.com>
Date: Tue, 31 May 2022 15:31:43 -0700
Subject: [PATCH] baseband/acc100: add protection for some negative scenario
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit 8454d94825181d7b833ea8346671e15b8dde5640 ]
Catch exception in PMD in case of invalid input parameter.
Fixes: 5ad5060f8f7a ("baseband/acc100: add LDPC processing functions")
Signed-off-by: Nicolas Chautru <nicolas.chautru at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
drivers/baseband/acc100/rte_acc100_pmd.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c
index 29b2f14807..cc3f54ef29 100644
--- a/drivers/baseband/acc100/rte_acc100_pmd.c
+++ b/drivers/baseband/acc100/rte_acc100_pmd.c
@@ -1234,6 +1234,8 @@ get_k0(uint16_t n_cb, uint16_t z_c, uint8_t bg, uint8_t rv_index)
return (bg == 1 ? ACC100_K0_3_1 : ACC100_K0_3_2) * z_c;
}
/* LBRM case - includes a division by N */
+ if (unlikely(z_c == 0))
+ return 0;
if (rv_index == 1)
return (((bg == 1 ? ACC100_K0_1_1 : ACC100_K0_1_2) * n_cb)
/ n) * z_c;
@@ -1758,6 +1760,10 @@ acc100_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
/* Soft output */
if (check_bit(op->turbo_dec.op_flags, RTE_BBDEV_TURBO_SOFT_OUTPUT)) {
+ if (op->turbo_dec.soft_output.data == 0) {
+ rte_bbdev_log(ERR, "Soft output is not defined");
+ return -1;
+ }
if (check_bit(op->turbo_dec.op_flags,
RTE_BBDEV_TURBO_EQUALIZER))
*s_out_length = e;
--
2.35.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-07-20 15:00:59.092564452 +0800
+++ 0006-baseband-acc100-add-protection-for-some-negative-sce.patch 2022-07-20 15:00:58.651000594 +0800
@@ -1 +1 @@
-From 8454d94825181d7b833ea8346671e15b8dde5640 Mon Sep 17 00:00:00 2001
+From 437389abd9170b9792966555653e9806c41cd453 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 8454d94825181d7b833ea8346671e15b8dde5640 ]
@@ -9 +11,0 @@
-Cc: stable at dpdk.org
@@ -18 +20 @@
-index 79bee4345d..32c8bc2b34 100644
+index 29b2f14807..cc3f54ef29 100644
@@ -21 +23 @@
-@@ -1236,6 +1236,8 @@ get_k0(uint16_t n_cb, uint16_t z_c, uint8_t bg, uint8_t rv_index)
+@@ -1234,6 +1234,8 @@ get_k0(uint16_t n_cb, uint16_t z_c, uint8_t bg, uint8_t rv_index)
@@ -30 +32 @@
-@@ -1764,6 +1766,10 @@ acc100_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
+@@ -1758,6 +1760,10 @@ acc100_dma_desc_td_fill(struct rte_bbdev_dec_op *op,
More information about the stable
mailing list