[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250804-idxd-fix-flr-on-kernel-queues-v3-v1-1-4e020fbf52c1@intel.com>
Date: Mon, 04 Aug 2025 18:27:52 -0700
From: Vinicius Costa Gomes <vinicius.gomes@...el.com>
To: Dave Jiang <dave.jiang@...el.com>, Vinod Koul <vkoul@...nel.org>,
Fenghua Yu <fenghua.yu@...el.com>, Dan Williams <dan.j.williams@...el.com>
Cc: dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
Vinicius Costa Gomes <vinicius.gomes@...el.com>
Subject: [PATCH 1/9] dmaengine: idxd: Fix lockdep warnings when calling
idxd_device_config()
idxd_device_config() should only be called with idxd->dev_lock held.
Hold the lock to the calls that were missing.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@...el.com>
---
drivers/dma/idxd/init.c | 2 ++
drivers/dma/idxd/irq.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c
index 35bdefd3728bb851beb0f235fae7c6d71bd59239..d828d352ab008127e5e442e7072c9d5df0f2c6cf 100644
--- a/drivers/dma/idxd/init.c
+++ b/drivers/dma/idxd/init.c
@@ -1091,7 +1091,9 @@ static void idxd_reset_done(struct pci_dev *pdev)
/* Re-configure IDXD device if allowed. */
if (test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags)) {
+ spin_lock(&idxd->dev_lock);
rc = idxd_device_config(idxd);
+ spin_unlock(&idxd->dev_lock);
if (rc < 0) {
dev_err(dev, "HALT: %s config fails\n", idxd_name);
goto out;
diff --git a/drivers/dma/idxd/irq.c b/drivers/dma/idxd/irq.c
index 1107db3ce0a3a65246bd0d9b1f96e99c9fa3def6..74059fe43fafeb930f58db21d3824f62b095b968 100644
--- a/drivers/dma/idxd/irq.c
+++ b/drivers/dma/idxd/irq.c
@@ -36,7 +36,9 @@ static void idxd_device_reinit(struct work_struct *work)
int rc, i;
idxd_device_reset(idxd);
+ spin_lock(&idxd->dev_lock);
rc = idxd_device_config(idxd);
+ spin_unlock(&idxd->dev_lock);
if (rc < 0)
goto out;
--
2.50.1
Powered by blists - more mailing lists