From 0eb6029669c1cab3b0e49c034fc976d5cdbe7821 Mon Sep 17 00:00:00 2001 From: wuchangsheng Date: Thu, 6 Oct 2022 17:13:02 +0800 Subject: [PATCH] reinit support ok --- 0019-reinit-support-return-ok.patch | 39 +++++++++++++++++++++++++++++ dpdk.spec | 6 ++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 0019-reinit-support-return-ok.patch diff --git a/0019-reinit-support-return-ok.patch b/0019-reinit-support-return-ok.patch new file mode 100644 index 0000000..93f4e1c --- /dev/null +++ b/0019-reinit-support-return-ok.patch @@ -0,0 +1,39 @@ +From d6d940b4a57cefdfa8efe751480cd4e7a1c10613 Mon Sep 17 00:00:00 2001 +From: wuchangsheng +Date: Thu, 6 Oct 2022 17:09:03 +0800 +Subject: [PATCH] reinit support return ok + +--- + lib/librte_eal/linux/eal/eal.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c +index 92f1b56..7673b18 100644 +--- a/lib/librte_eal/linux/eal/eal.c ++++ b/lib/librte_eal/linux/eal/eal.c +@@ -1081,6 +1081,7 @@ rte_eal_init(int argc, char **argv) + int i, fctret, ret; + pthread_t thread_id; + static rte_atomic32_t run_once = RTE_ATOMIC32_INIT(0); ++ static uint32_t reinit_ok = 0; + const char *p; + static char logid[PATH_MAX]; + char cpuset[RTE_CPU_AFFINITY_STR_LEN]; +@@ -1094,7 +1095,14 @@ rte_eal_init(int argc, char **argv) + return -1; + } + ++ if (argc > 1 && !strncmp(argv[1], "reinit-ok", strlen("reinit-ok"))) { ++ reinit_ok = 1; ++ } ++ + if (!rte_atomic32_test_and_set(&run_once)) { ++ if (reinit_ok) { ++ return 0; ++ } + rte_eal_init_alert("already called initialization."); + rte_errno = EALREADY; + return -1; +-- +2.27.0 + diff --git a/dpdk.spec b/dpdk.spec index 315762c..b386792 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -1,6 +1,6 @@ Name: dpdk Version: 19.11 -Release: 20 +Release: 21 Packager: packaging@6wind.com URL: http://dpdk.org %global source_version 19.11 @@ -43,6 +43,7 @@ Patch33: 0017-fix-internal-cfg-and-fbarray-attach-mememory-leak.patch Patch34: 0018-fix-error-that-the-secondary-attach-fails-due-to-detach.patch Patch35: CVE-2021-3839.patch Patch36: CVE-2022-0669.patch +Patch37: 0019-reinit-support-return-ok.patch Patch6000: backport-vhost-handle-mbuf-allocation-failure.patch Patch6001: backport-0001-CVE-2022-2132.patch @@ -200,6 +201,9 @@ strip -g $RPM_BUILD_ROOT/lib/modules/${namer}/extra/dpdk/rte_kni.ko /usr/sbin/depmod %changelog +* Thu Oct 6 2022 wuchangsheng - 19.11-21 +- reinit support return ok + * Fri Sep 9 2022 jiangheng - 19.11-20 - fix CVE-2022-28199 -- Gitee