patch 'app/regex: avoid division by zero' has been queued to stable release 21.11.2

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Jul 6 22:35:04 CEST 2022


Hi,

FYI, your patch has been queued to stable release 21.11.2

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/08/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/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/81a0919f6a161209071407bc1e8b774308094ab5

Thanks.

Luca Boccassi

---
>From 81a0919f6a161209071407bc1e8b774308094ab5 Mon Sep 17 00:00:00 2001
From: Thierry Herbelot <thierry.herbelot at 6wind.com>
Date: Mon, 24 May 2021 10:57:00 +0200
Subject: [PATCH] app/regex: avoid division by zero

[ upstream commit 1afdf9edc8f7122cdaf8dae78e29fe8642c21484 ]

Check that nb_jobs is not zero before using it for a division.

Fixes: f5cffb7eb7fb6 ("app/regex: read data file once at startup")

Signed-off-by: Thierry Herbelot <thierry.herbelot at 6wind.com>
---
 app/test-regex/main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test-regex/main.c b/app/test-regex/main.c
index 756726f8db..564025bceb 100644
--- a/app/test-regex/main.c
+++ b/app/test-regex/main.c
@@ -732,6 +732,8 @@ main(int argc, char **argv)
 		rte_exit(EXIT_FAILURE, "Number of QPs must be greater than 0\n");
 	if (nb_lcores == 0)
 		rte_exit(EXIT_FAILURE, "Number of lcores must be greater than 0\n");
+	if (nb_jobs == 0)
+		rte_exit(EXIT_FAILURE, "Number of jobs must be greater than 0\n");
 	if (distribute_qps_to_lcores(nb_lcores, nb_qps, &qps_per_lcore) < 0)
 		rte_exit(EXIT_FAILURE, "Failed to distribute queues to lcores!\n");
 	ret = init_port(&nb_max_payload, rules_file,
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-06 21:07:54.557995572 +0100
+++ 0029-app-regex-avoid-division-by-zero.patch	2022-07-06 21:07:53.579519398 +0100
@@ -1 +1 @@
-From 1afdf9edc8f7122cdaf8dae78e29fe8642c21484 Mon Sep 17 00:00:00 2001
+From 81a0919f6a161209071407bc1e8b774308094ab5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1afdf9edc8f7122cdaf8dae78e29fe8642c21484 ]
+
@@ -9 +10,0 @@
-Cc: stable at dpdk.org
@@ -17 +18 @@
-index 7c014b2210..fe90e11313 100644
+index 756726f8db..564025bceb 100644
@@ -20 +21 @@
-@@ -728,6 +728,8 @@ main(int argc, char **argv)
+@@ -732,6 +732,8 @@ main(int argc, char **argv)


More information about the stable mailing list