patch 'net/failsafe: fix hotplug mutex for multi-process' has been queued to stable release 24.11.7
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Jun 11 15:19:32 CEST 2026
Hi,
FYI, your patch has been queued to stable release 24.11.7
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/13/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/0e0e00dc822f2ecea13b7cfa230a3aaf09f06e4a
Thanks.
Luca Boccassi
---
>From 0e0e00dc822f2ecea13b7cfa230a3aaf09f06e4a Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Wed, 29 Apr 2026 11:46:40 -0700
Subject: [PATCH] net/failsafe: fix hotplug mutex for multi-process
[ upstream commit c0b8fc5e4f6a9bf5447f2b9c55636576e962ed9c ]
The failsafe driver supports secondary process attachment via
rte_eth_dev_attach_secondary() in rte_pmd_failsafe_probe(). The
hotplug_mutex protects shared state but was initialized without
PTHREAD_PROCESS_SHARED.
The mutex is also recursive, so the EAL helper does not fit; set the
attribute alongside the recursive type. Also add the missing
pthread_mutexattr_destroy() call.
Bugzilla ID: 662
Fixes: 655fcd68c7d2 ("net/failsafe: fix hotplug races")
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Konstantin Ananyev <konstantin.ananyev at huawei.com>
---
drivers/net/failsafe/failsafe.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index 32811403b4..f696911858 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -144,15 +144,24 @@ fs_mutex_init(struct fs_priv *priv)
/* Allow mutex relocks for the thread holding the mutex. */
ret = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
if (ret) {
- ERROR("Cannot set mutex type - %s", strerror(ret));
- return ret;
+ ERROR("Cannot set mutex recursive - %s", strerror(ret));
+ goto out;
+ }
+ /* Allow mutex to be shared between processes. */
+ ret = pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
+ if (ret) {
+ ERROR("Cannot set mutex pshared - %s", strerror(ret));
+ goto out;
}
ret = pthread_mutex_init(&priv->hotplug_mutex, &attr);
if (ret) {
ERROR("Cannot initiate mutex - %s", strerror(ret));
- return ret;
+ goto out;
}
- return 0;
+
+out:
+ pthread_mutexattr_destroy(&attr);
+ return ret;
}
static int
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-06-11 14:20:02.265930790 +0100
+++ 0023-net-failsafe-fix-hotplug-mutex-for-multi-process.patch 2026-06-11 14:20:01.186745302 +0100
@@ -1 +1 @@
-From c0b8fc5e4f6a9bf5447f2b9c55636576e962ed9c Mon Sep 17 00:00:00 2001
+From 0e0e00dc822f2ecea13b7cfa230a3aaf09f06e4a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c0b8fc5e4f6a9bf5447f2b9c55636576e962ed9c ]
+
@@ -17 +18,0 @@
-Cc: stable at dpdk.org
@@ -22,2 +23,2 @@
- drivers/net/failsafe/failsafe.c | 15 ++++++++++++---
- 1 file changed, 12 insertions(+), 3 deletions(-)
+ drivers/net/failsafe/failsafe.c | 17 +++++++++++++----
+ 1 file changed, 13 insertions(+), 4 deletions(-)
@@ -26 +27 @@
-index 3e590d38f7..aa3fe53b22 100644
+index 32811403b4..f696911858 100644
@@ -29 +30 @@
-@@ -144,11 +144,20 @@ fs_mutex_init(struct fs_priv *priv)
+@@ -144,15 +144,24 @@ fs_mutex_init(struct fs_priv *priv)
@@ -37 +38 @@
- }
++ }
@@ -43,4 +44,9 @@
-+ }
-+ pthread_mutex_init(&priv->hotplug_mutex, &attr);
-
-- return pthread_mutex_init(&priv->hotplug_mutex, &attr);
+ }
+ ret = pthread_mutex_init(&priv->hotplug_mutex, &attr);
+ if (ret) {
+ ERROR("Cannot initiate mutex - %s", strerror(ret));
+- return ret;
++ goto out;
+ }
+- return 0;
++
More information about the stable
mailing list