Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1439353 > unrolled thread

[PATCH 12/20] iommu/amd: Allow NULL pointer parameter for domain_flush_complete()

Started byJoerg Roedel <joro@8bytes.org>
First post2016-07-08 13:50 +0200
Last post2016-07-08 13:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 12/20] iommu/amd: Allow NULL pointer parameter for domain_flush_complete() Joerg Roedel <joro@8bytes.org> - 2016-07-08 13:50 +0200

#1439353 — [PATCH 12/20] iommu/amd: Allow NULL pointer parameter for domain_flush_complete()

FromJoerg Roedel <joro@8bytes.org>
Date2016-07-08 13:50 +0200
Subject[PATCH 12/20] iommu/amd: Allow NULL pointer parameter for domain_flush_complete()
Message-ID<rSCsa-4e3-73@gated-at.bofh.it>
From: Joerg Roedel <jroedel@suse.de>

If domain == NULL is passed to the function, it will queue a
completion-wait command on all IOMMUs in the system.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 drivers/iommu/amd_iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 4e27c57..7b8e1f8 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -1185,7 +1185,7 @@ static void domain_flush_complete(struct protection_domain *domain)
 	int i;
 
 	for (i = 0; i < amd_iommus_present; ++i) {
-		if (!domain->dev_iommu[i])
+		if (domain && !domain->dev_iommu[i])
 			continue;
 
 		/*
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web