patch 'mem: fix lockup on address space shortage' has been queued to stable release 22.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Jun 12 23:07:03 CEST 2025
Hi,
FYI, your patch has been queued to stable release 22.11.9
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/25. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d1423b3880669f8817741d02362796831d8f02c8
Thanks.
Luca Boccassi
---
>From d1423b3880669f8817741d02362796831d8f02c8 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <huangdengdui at huawei.com>
Date: Thu, 3 Apr 2025 10:57:36 +0800
Subject: [PATCH] mem: fix lockup on address space shortage
[ upstream commit 6643d1cad3b8a90a0e5ec4a4afa0d9f61dc5b34e ]
When the process address space is insufficient, mmap will fail,
which will cause an infinite loop.
This patch stops attempting mmap if it fails and
the requested size cannot be reduced.
Fixes: b7cc54187ea4 ("mem: move virtual area function in common directory")
Signed-off-by: Dengdui Huang <huangdengdui at huawei.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
lib/eal/common/eal_common_memory.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/eal/common/eal_common_memory.c b/lib/eal/common/eal_common_memory.c
index da6711d129..dab4f4cde1 100644
--- a/lib/eal/common/eal_common_memory.c
+++ b/lib/eal/common/eal_common_memory.c
@@ -99,8 +99,12 @@ eal_get_virtual_area(void *requested_addr, size_t *size,
mapped_addr = eal_mem_reserve(
requested_addr, (size_t)map_sz, reserve_flags);
- if ((mapped_addr == NULL) && allow_shrink)
- *size -= page_sz;
+ if (mapped_addr == NULL) {
+ if (allow_shrink)
+ *size -= page_sz;
+ else
+ break;
+ }
if ((mapped_addr != NULL) && addr_is_hint &&
(mapped_addr != requested_addr)) {
--
2.47.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-12 22:06:25.576283738 +0100
+++ 0046-mem-fix-lockup-on-address-space-shortage.patch 2025-06-12 22:06:23.874044722 +0100
@@ -1 +1 @@
-From 6643d1cad3b8a90a0e5ec4a4afa0d9f61dc5b34e Mon Sep 17 00:00:00 2001
+From d1423b3880669f8817741d02362796831d8f02c8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6643d1cad3b8a90a0e5ec4a4afa0d9f61dc5b34e ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index a2f64408f4..bfa36b8268 100644
+index da6711d129..dab4f4cde1 100644
@@ -25 +26 @@
-@@ -102,8 +102,12 @@ eal_get_virtual_area(void *requested_addr, size_t *size,
+@@ -99,8 +99,12 @@ eal_get_virtual_area(void *requested_addr, size_t *size,
More information about the stable
mailing list