git: e8fc8eb8b8f5 - main - msi_release(): consistently unlock msi_lock around iommu_unmap_msi_intr()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 04 Sep 2024 21:50:57 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=e8fc8eb8b8f55072379f65f5f058b81870031b7d
commit e8fc8eb8b8f55072379f65f5f058b81870031b7d
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-08-27 02:28:49 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-09-04 21:50:20 +0000
msi_release(): consistently unlock msi_lock around iommu_unmap_msi_intr()
Sponsored by: Advanced Micro Devices (AMD)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
---
sys/x86/x86/msi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys/x86/x86/msi.c b/sys/x86/x86/msi.c
index 177bd7868ec4..c8e7db9469ed 100644
--- a/sys/x86/x86/msi.c
+++ b/sys/x86/x86/msi.c
@@ -555,7 +555,9 @@ msi_release(int *irqs, int count)
KASSERT(msi->msi_first == first, ("message not in group"));
KASSERT(msi->msi_dev == first->msi_dev, ("owner mismatch"));
#ifdef IOMMU
+ mtx_unlock(&msi_lock);
iommu_unmap_msi_intr(first->msi_dev, msi->msi_remap_cookie);
+ mtx_lock(&msi_lock);
#endif
msi->msi_first = NULL;
msi->msi_dev = NULL;