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


Groups > linux.kernel > #1447245

Re: [RFC PATCH] iommu: create direct_mapping after device attached

From Joerg Roedel <joro@8bytes.org>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] iommu: create direct_mapping after device attached
Date 2016-07-20 16:10 +0200
Message-ID <rX0me-2ra-21@gated-at.bofh.it> (permalink)
References <rWZ6N-1u8-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Jul 20, 2016 at 08:49:21PM +0800, honghui.zhang@mediatek.com wrote:
> From: Honghui Zhang <honghui.zhang@mediatek.com>
> 
> For mtk iommu, the domain_finalize was called in device attatch, the mtk
> iommu iopgt ops was allocated and initialized in domain_finalize, the
> iommu_group_create_direct_mappings would call the map interface to
> implement the map. If it's earlier than device attach, there would be NULL
> dereference. Move the iommu_group_create_direct_mappings call after device
> attached.

No, this would open a race window where the device is attached, but
doesn't have its unity-mappings in place. You should re-organize the mtk
driver instead, so that it works in this order too.



	Joerg

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC PATCH] iommu: create direct_mapping after device attached <honghui.zhang@mediatek.com> - 2016-07-20 14:50 +0200
  Re: [RFC PATCH] iommu: create direct_mapping after device attached Joerg Roedel <joro@8bytes.org> - 2016-07-20 16:10 +0200

csiph-web