patch 'mem: fix lockup on address space shortage' has been queued to stable release 24.11.3

Kevin Traynor ktraynor at redhat.com
Fri Jul 18 21:29:59 CEST 2025


Hi,

FYI, your patch has been queued to stable release 24.11.3

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

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

Thanks.

Kevin

---
>From de2ffd73f2895a71067a27f7a9f93d60a3afd4ea 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 a185e0b580..0c997201bd 100644
--- a/lib/eal/common/eal_common_memory.c
+++ b/lib/eal/common/eal_common_memory.c
@@ -102,6 +102,10 @@ 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 &&
-- 
2.50.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-07-18 20:29:13.320019595 +0100
+++ 0065-mem-fix-lockup-on-address-space-shortage.patch	2025-07-18 20:29:10.965907438 +0100
@@ -1 +1 @@
-From 6643d1cad3b8a90a0e5ec4a4afa0d9f61dc5b34e Mon Sep 17 00:00:00 2001
+From de2ffd73f2895a71067a27f7a9f93d60a3afd4ea 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 a185e0b580..0c997201bd 100644
@@ -25 +26 @@
-@@ -103,6 +103,10 @@ eal_get_virtual_area(void *requested_addr, size_t *size,
+@@ -102,6 +102,10 @@ eal_get_virtual_area(void *requested_addr, size_t *size,



More information about the stable mailing list