patch 'eal/freebsd: fix FD leak in alarm subsystem' has been queued to stable release 24.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Tue Oct 27 12:51:18 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.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 10/29/26. 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/d6281de8766873a201d7aa44b8fc1b201798d3e6
Thanks.
Luca Boccassi
---
>From d6281de8766873a201d7aa44b8fc1b201798d3e6 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Wed, 14 Oct 2026 18:43:09 +0200
Subject: [PATCH] eal/freebsd: fix FD leak in alarm subsystem
[ upstream commit d4f144ddfa74537b82a2e471003cc97df6e9e1cf ]
Caught by code review, while looking at rte_intr_instance_free() users.
Even if the FD is not used, it must still be closed when uninitialising
the alarm subsystem.
Fixes: 26021a715067 ("eal/bsd: support alarm API")
Signed-off-by: David Marchand <david.marchand at redhat.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
lib/eal/freebsd/eal_alarm.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/eal/freebsd/eal_alarm.c b/lib/eal/freebsd/eal_alarm.c
index 65e8a4eb6bb..0f56a34e997 100644
--- a/lib/eal/freebsd/eal_alarm.c
+++ b/lib/eal/freebsd/eal_alarm.c
@@ -10,6 +10,7 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
+#include <unistd.h>
#include <errno.h>
#include <eal_trace_internal.h>
@@ -53,6 +54,8 @@ rte_eal_alarm_cleanup(void)
int ret = rte_intr_callback_unregister_sync(intr_handle,
eal_alarm_callback, (void *)-1);
if (ret >= 0) {
+ close(rte_intr_fd_get(intr_handle));
+ rte_intr_fd_set(intr_handle, -1);
rte_intr_instance_free(intr_handle);
intr_handle = NULL;
}
@@ -61,7 +64,7 @@ rte_eal_alarm_cleanup(void)
int
rte_eal_alarm_init(void)
{
- int fd;
+ int fd = -1;
intr_handle = rte_intr_instance_alloc(RTE_INTR_INSTANCE_F_PRIVATE);
if (intr_handle == NULL) {
@@ -87,6 +90,8 @@ rte_eal_alarm_init(void)
return 0;
error:
+ if (fd >= 0)
+ close(fd);
rte_intr_instance_free(intr_handle);
return -1;
}
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-10-27 11:44:00.759348103 +0000
+++ 0184-eal-freebsd-fix-FD-leak-in-alarm-subsystem.patch 2026-10-27 11:43:53.766067248 +0000
@@ -1 +1 @@
-From d4f144ddfa74537b82a2e471003cc97df6e9e1cf Mon Sep 17 00:00:00 2001
+From d6281de8766873a201d7aa44b8fc1b201798d3e6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d4f144ddfa74537b82a2e471003cc97df6e9e1cf ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index c03e281e67..8544fe8d03 100644
+index 65e8a4eb6bb..0f56a34e997 100644
@@ -31,2 +32,2 @@
- #include <eal_export.h>
-@@ -54,6 +55,8 @@ rte_eal_alarm_cleanup(void)
+ #include <eal_trace_internal.h>
+@@ -53,6 +54,8 @@ rte_eal_alarm_cleanup(void)
@@ -41 +42 @@
-@@ -62,7 +65,7 @@ rte_eal_alarm_cleanup(void)
+@@ -61,7 +64,7 @@ rte_eal_alarm_cleanup(void)
@@ -50 +51 @@
-@@ -88,6 +91,8 @@ rte_eal_alarm_init(void)
+@@ -87,6 +90,8 @@ rte_eal_alarm_init(void)
More information about the stable
mailing list