lkml.org 
[lkml]   [2015]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/5] iommu: Make sure a device is always attached to a domain
On Wed, Jan 28, 2015 at 02:38:52PM +0000, Will Deacon wrote:
> On Tue, Jan 27, 2015 at 12:08:58AM +0000, Joerg Roedel wrote:
> > - return iommu_group_for_each_dev(group, domain,
> > - iommu_group_do_attach_device);
> > + int ret;
> > +
> > + if (group->default_domain && group->domain != group->default_domain)
> > + return -EBUSY;
>
> I think this is now racy with itself and detach, whereas before we always
> held the group->mutex by virtue of iommu_group_for_each_dev.

You are right, thanks. I will update the code with correct locking.


Joerg



\
 
 \ /
  Last update: 2015-01-30 13:41    [W:0.206 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site