[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c69320f8-c906-549f-0fbd-ef4c9b665f25@linux.intel.com>
Date: Tue, 23 Aug 2022 14:26:19 +0800
From: Baolu Lu <baolu.lu@...ux.intel.com>
To: iommu@...ts.linux.dev
Cc: baolu.lu@...ux.intel.com, Joerg Roedel <joro@...tes.org>,
Will Deacon <will@...nel.org>,
Robin Murphy <robin.murphy@....com>,
Kevin Tian <kevin.tian@...el.com>, yi.l.liu@...el.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] iommu/vt-d: Fix possible recursive lock in
iommu_flush_dev_iotlb()
On 2022/8/17 10:56, Lu Baolu wrote:
> The per domain spinlock is acquired in iommu_flush_dev_iotlb(), which
> is possbile to be called in the interrupt context. For instance,
>
> <IRQ>
> iommu_flush_dev_iotlb
> iommu_flush_iotlb_psi
> intel_iommu_tlb_sync
> iommu_iotlb_sync
> __iommu_dma_unmap
> ? nvme_unmap_data
> nvme_unmap_data
> nvme_pci_complete_rq
> nvme_irq
> __handle_irq_event_percpu
> handle_irq_event_percpu
> handle_irq_event
> handle_edge_irq
> __common_interrupt
> common_interrupt
>
> This coverts the spin_lock/unlock() into the irq save/restore varieties
> to avoid the possible recursive locking issues.
>
> Fixes: ffd5869d93530 ("iommu/vt-d: Replace spin_lock_irqsave() with spin_lock()")
> Signed-off-by: Lu Baolu<baolu.lu@...ux.intel.com>
This patch has been queued:
https://lore.kernel.org/linux-iommu/20220823061557.1631056-1-baolu.lu@linux.intel.com/
Best regards,
baolu
Powered by blists - more mailing lists