Re: [PATCH 1/2] iommu: Fix race condition during default domain allocation

2021-06-17 Thread Will Deacon
On Thu, Jun 17, 2021 at 11:21:39AM +0530, Ashish Mhetre wrote: > > > On 6/11/2021 6:19 PM, Robin Murphy wrote: > > External email: Use caution opening links or attachments > > > > > > On 2021-06-11 11:45, Will Deacon wrote: > > > On Thu, Jun 10, 2021 at 09:46:53AM +0530, Ashish Mhetre wrote: >

Re: [PATCH 1/2] iommu: Fix race condition during default domain allocation

2021-06-16 Thread Ashish Mhetre
On 6/11/2021 6:19 PM, Robin Murphy wrote: External email: Use caution opening links or attachments On 2021-06-11 11:45, Will Deacon wrote: On Thu, Jun 10, 2021 at 09:46:53AM +0530, Ashish Mhetre wrote: Domain is getting created more than once during asynchronous multiple display heads(devic

RE: [PATCH 1/2] iommu: Fix race condition during default domain allocation

2021-06-11 Thread Krishna Reddy
> > + mutex_lock(&group->mutex); > > iommu_alloc_default_domain(group, dev); > > + mutex_unlock(&group->mutex); > > It feels wrong to serialise this for everybody just to cater for systems with > aliasing SIDs between devices. Serialization is limited to devices in the same group. U

Re: [PATCH 1/2] iommu: Fix race condition during default domain allocation

2021-06-11 Thread Robin Murphy
On 2021-06-11 11:45, Will Deacon wrote: On Thu, Jun 10, 2021 at 09:46:53AM +0530, Ashish Mhetre wrote: Domain is getting created more than once during asynchronous multiple display heads(devices) probe. All the display heads share same SID and are expected to be in same domain. As iommu_alloc_de

Re: [PATCH 1/2] iommu: Fix race condition during default domain allocation

2021-06-11 Thread Will Deacon
On Thu, Jun 10, 2021 at 09:46:53AM +0530, Ashish Mhetre wrote: > Domain is getting created more than once during asynchronous multiple > display heads(devices) probe. All the display heads share same SID and > are expected to be in same domain. As iommu_alloc_default_domain() call > is not protecte

[PATCH 1/2] iommu: Fix race condition during default domain allocation

2021-06-09 Thread Ashish Mhetre
Domain is getting created more than once during asynchronous multiple display heads(devices) probe. All the display heads share same SID and are expected to be in same domain. As iommu_alloc_default_domain() call is not protected, the group->default_domain and group->domain are ending up with diffe