From: Baolu Lu <baolu.lu@linux.intel.com>
To: iommu@lists.linux.dev
Cc: baolu.lu@linux.intel.com, Joerg Roedel <joro@8bytes.org>,
Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Kevin Tian <kevin.tian@intel.com>,
yi.l.liu@intel.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] iommu/vt-d: Fix possible recursive lock in iommu_flush_dev_iotlb()
Date: Tue, 23 Aug 2022 14:26:19 +0800 [thread overview]
Message-ID: <c69320f8-c906-549f-0fbd-ef4c9b665f25@linux.intel.com> (raw)
In-Reply-To: <20220817025650.3253959-1-baolu.lu@linux.intel.com>
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@linux.intel.com>
This patch has been queued:
https://lore.kernel.org/linux-iommu/20220823061557.1631056-1-baolu.lu@linux.intel.com/
Best regards,
baolu
prev parent reply other threads:[~2022-08-23 6:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-17 2:56 [PATCH 1/1] iommu/vt-d: Fix possible recursive lock in iommu_flush_dev_iotlb() Lu Baolu
2022-08-19 19:07 ` Lucas De Marchi
2022-08-23 6:26 ` Baolu Lu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c69320f8-c906-549f-0fbd-ef4c9b665f25@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
--cc=yi.l.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox