patch 'bus/fslmc: fix deadlock on MC send command timeout' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Mon Feb 27 07:58:49 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

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/01/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=23a5b25c8aca04fc1e79890b3e92c3f646c5a72d

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 23a5b25c8aca04fc1e79890b3e92c3f646c5a72d Mon Sep 17 00:00:00 2001
From: Alvaro Karsz <alvaro.karsz at solid-run.com>
Date: Wed, 4 Jan 2023 09:40:51 +0200
Subject: [PATCH] bus/fslmc: fix deadlock on MC send command timeout
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 06cce2876a37ac6161652bd121ce1ff03d52cce5 ]

Bug in function mc_send_command: a spinlock is not unlocked in case
of timeouts.

Fixes: 79711846f676 ("bus/fslmc: add timeout in MC send command")

Signed-off-by: Alvaro Karsz <alvaro.karsz at solid-run.com>
Reviewed-by: David Marchand <david.marchand at redhat.com>
---
 .mailmap                      | 1 +
 drivers/bus/fslmc/mc/mc_sys.c | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index 75884b6fe2..db7440407b 100644
--- a/.mailmap
+++ b/.mailmap
@@ -64,6 +64,7 @@ Ali Volkan Atli <volkan.atli at argela.com.tr>
 Allain Legacy <allain.legacy at windriver.com>
 Allen Hubbe <allen.hubbe at amd.com>
 Alok Makhariya <alok.makhariya at nxp.com>
+Alvaro Karsz <alvaro.karsz at solid-run.com>
 Alvin Zhang <alvinx.zhang at intel.com>
 Aman Singh <aman.deep.singh at intel.com>
 Amaranath Somalapuram <asomalap at amd.com>
diff --git a/drivers/bus/fslmc/mc/mc_sys.c b/drivers/bus/fslmc/mc/mc_sys.c
index ab9a074835..76fdcd5c8a 100644
--- a/drivers/bus/fslmc/mc/mc_sys.c
+++ b/drivers/bus/fslmc/mc/mc_sys.c
@@ -77,8 +77,11 @@ int mc_send_command(struct fsl_mc_io *mc_io, struct mc_command *cmd)
 		total_time = rte_get_timer_cycles() - start_time;
 	} while (status == MC_CMD_STATUS_READY && total_time <= time_to_wait);

-	if (status == MC_CMD_STATUS_READY)
+	if (status == MC_CMD_STATUS_READY) {
+		rte_spinlock_unlock(&mc_portal_lock);
+
 		return mc_status_to_error(MC_CMD_STATUS_TIMEOUT);
+	}

 	/* Read the response back into the command buffer */
 	mc_read_response(mc_io->regs, cmd);
--
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-27 14:08:41.670737000 +0800
+++ 0022-bus-fslmc-fix-deadlock-on-MC-send-command-timeout.patch	2023-02-27 14:08:40.739237000 +0800
@@ -1 +1 @@
-From 06cce2876a37ac6161652bd121ce1ff03d52cce5 Mon Sep 17 00:00:00 2001
+From 23a5b25c8aca04fc1e79890b3e92c3f646c5a72d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 06cce2876a37ac6161652bd121ce1ff03d52cce5 ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list