[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <905d3feb-f75b-e91c-f3de-b69718aa5c69@intel.com>
Date: Tue, 23 Aug 2022 09:46:19 -0700
From: Dave Jiang <dave.jiang@...el.com>
To: Jerry Snitselaar <jsnitsel@...hat.com>,
linux-kernel@...r.kernel.org
Cc: Fenghua Yu <fenghua.yu@...el.com>, Vinod Koul <vkoul@...nel.org>,
dmaengine@...r.kernel.org
Subject: Re: [PATCH v2] dmaengine: idxd: avoid deadlock in
process_misc_interrupts()
On 8/23/2022 9:37 AM, Jerry Snitselaar wrote:
> idxd_device_clear_state() now grabs the idxd->dev_lock
> itself, so don't grab the lock prior to calling it.
>
> This was seen in testing after dmar fault occurred on system,
> resulting in lockup stack traces.
>
> Cc: Fenghua Yu <fenghua.yu@...el.com>
> Cc: Dave Jiang <dave.jiang@...el.com>
> Cc: Vinod Koul <vkoul@...nel.org>
> Cc: dmaengine@...r.kernel.org
> Fixes: cf4ac3fef338 ("dmaengine: idxd: fix lockdep warning on device driver removal")
> Signed-off-by: Jerry Snitselaar <jsnitsel@...hat.com>
Thanks Jerry!
Reviewed-by: Dave Jiang <dave.jiang@...el.com>
> ---
> v2: add Fixes tag, and add subsystem to summary
>
> drivers/dma/idxd/irq.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/dma/idxd/irq.c b/drivers/dma/idxd/irq.c
> index 743ead5ebc57..5b9921475be6 100644
> --- a/drivers/dma/idxd/irq.c
> +++ b/drivers/dma/idxd/irq.c
> @@ -324,13 +324,11 @@ static int process_misc_interrupts(struct idxd_device *idxd, u32 cause)
> idxd->state = IDXD_DEV_HALTED;
> idxd_wqs_quiesce(idxd);
> idxd_wqs_unmap_portal(idxd);
> - spin_lock(&idxd->dev_lock);
> idxd_device_clear_state(idxd);
> dev_err(&idxd->pdev->dev,
> "idxd halted, need %s.\n",
> gensts.reset_type == IDXD_DEVICE_RESET_FLR ?
> "FLR" : "system reset");
> - spin_unlock(&idxd->dev_lock);
> return -ENXIO;
> }
> }
Powered by blists - more mailing lists