patch 'eal/freebsd: fix FD leak in alarm subsystem' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 14:02:27 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/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/kevintraynor/dpdk-stable

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

Thanks.

Kevin

---
>From 774558b47c825a7a17afe2bb81fcd82d530c5ddb 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 c03e281e67..8544fe8d03 100644
--- a/lib/eal/freebsd/eal_alarm.c
+++ b/lib/eal/freebsd/eal_alarm.c
@@ -11,4 +11,5 @@
 #include <string.h>
 #include <time.h>
+#include <unistd.h>
 #include <errno.h>
 
@@ -55,4 +56,6 @@ rte_eal_alarm_cleanup(void)
 			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;
@@ -63,5 +66,5 @@ int
 rte_eal_alarm_init(void)
 {
-	int fd;
+	int fd = -1;
 
 	intr_handle = rte_intr_instance_alloc(RTE_INTR_INSTANCE_F_PRIVATE);
@@ -89,4 +92,6 @@ rte_eal_alarm_init(void)
 	return 0;
 error:
+	if (fd >= 0)
+		close(fd);
 	rte_intr_instance_free(intr_handle);
 	return -1;
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:45.534889271 +0000
+++ 0221-eal-freebsd-fix-FD-leak-in-alarm-subsystem.patch	2026-12-03 12:52:39.189837802 +0000
@@ -1 +1 @@
-From d4f144ddfa74537b82a2e471003cc97df6e9e1cf Mon Sep 17 00:00:00 2001
+From 774558b47c825a7a17afe2bb81fcd82d530c5ddb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d4f144ddfa74537b82a2e471003cc97df6e9e1cf ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list