Re: [PATCH 1/1] iommu: Avoid races around default domain allocations

From: Jason Gunthorpe
Date: Thu Feb 08 2024 - 11:09:44 EST


On Thu, Feb 08, 2024 at 08:47:42PM +0530, Nikhil V wrote:

> Also, as Jason pointed out, this fix would not allow changing the
> default domain for an iommu group. We didn't have any usecase for
> changing default domain, hence couldn't see any issues with the fix
> proposed. So, we would have to rework the patch for it to be
> upstream ready. Any suggestions for this would be really helpful and
> appreciated. Thanks!!!

I think you can lift and duplicate the check into the callers and that
way restrict it only to the probe paths.

Jason