patch 'vhost: fix resource leak on driver registration failure' has been queued to stable release 25.11.1

Kevin Traynor ktraynor at redhat.com
Thu Mar 19 11:03:24 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.1

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

Thanks.

Kevin

---
>From 94b97b4e741b90b20c66dc6b3067aa94af89a472 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor at redhat.com>
Date: Thu, 12 Mar 2026 10:36:03 +0000
Subject: [PATCH] vhost: fix resource leak on driver registration failure

[ upstream commit 26bb3ebd833e24aa2a11211bc8fedfcda69aa253 ]

When the return value check for pthread_mutex_init() was removed the
out_free label and vhost_user_socket_mem_free() were removed.

The free is still needed as vsocket was not being freed on out_mutex
error path.

Restore vhost_user_socket_mem_free() on error path.

Fixes: 4d2aa150769b ("vhost: remove check around mutex init")

Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 lib/vhost/socket.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
index eb01231478..70e582a18d 100644
--- a/lib/vhost/socket.c
+++ b/lib/vhost/socket.c
@@ -1037,4 +1037,5 @@ out_mutex:
 		VHOST_CONFIG_LOG(path, ERR, "failed to destroy connection mutex");
 	}
+	vhost_user_socket_mem_free(vsocket);
 out:
 	pthread_mutex_unlock(&vhost_user.mutex);
-- 
2.53.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-03-19 10:01:09.525652011 +0000
+++ 0086-vhost-fix-resource-leak-on-driver-registration-failu.patch	2026-03-19 10:01:07.135606022 +0000
@@ -1 +1 @@
-From 26bb3ebd833e24aa2a11211bc8fedfcda69aa253 Mon Sep 17 00:00:00 2001
+From 94b97b4e741b90b20c66dc6b3067aa94af89a472 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 26bb3ebd833e24aa2a11211bc8fedfcda69aa253 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list