mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/3] dmar: Fix domain id not update to newly create
@ 2013-12-13  5:16 Youquan Song
  2013-12-13  5:16 ` [PATCH 2/3] dmar: Move the confuse comments to proper place Youquan Song
  0 siblings, 1 reply; 3+ messages in thread
From: Youquan Song @ 2013-12-13  5:16 UTC (permalink / raw)
  To: David Woodhouse, David Woodhouse
  Cc: iommu, linux-kernel, Youquan Song, Youquan Song, zhiyuan.zhou

At domain_context_mapping_one(), if the domain is still not assign domain id,
it will assign a new domain_id for it, but the newly creating domain id is not
update to domain, so the domain will keep an unkown domain id.

It will cause the issues: like flush wrong domain in iommu->flush.flush_iotlb,
and free/release wrong domain.

Tested-by: Zhiyuan Zhou <zhiyuan.zhou@intel.com>
Signed-off-by: Youquan Song <youquan.song@intel.com>
---
 drivers/iommu/intel-iommu.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 43b9bfe..9cd522f 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -1625,6 +1625,7 @@ static int domain_context_mapping_one(struct dmar_domain *domain, int segment,
 		}
 	}
 
+	domain->id = id;
 	context_set_domain_id(context, id);
 
 	if (translation != CONTEXT_TT_PASS_THROUGH) {
-- 
1.7.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-12 16:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-13  5:16 [PATCH 1/3] dmar: Fix domain id not update to newly create Youquan Song
2013-12-13  5:16 ` [PATCH 2/3] dmar: Move the confuse comments to proper place Youquan Song
2013-12-13  5:16   ` [PATCH 3/3] dmar: reduce loop to find multi-devices owned by IOMMU Youquan Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®