Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 719B3C433F5 for ; Mon, 6 Dec 2021 11:40:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242616AbhLFLno (ORCPT ); Mon, 6 Dec 2021 06:43:44 -0500 Received: from 8bytes.org ([81.169.241.247]:40074 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241994AbhLFLnm (ORCPT ); Mon, 6 Dec 2021 06:43:42 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id DAB2A37E; Mon, 6 Dec 2021 12:40:12 +0100 (CET) Date: Mon, 6 Dec 2021 12:40:11 +0100 From: Joerg Roedel To: Lu Baolu Cc: Will Deacon , Ashish Mhetre , Jason Gunthorpe , kevin.tian@intel.com, ashok.raj@intel.com, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] iommu: Extend mutex lock scope in iommu_probe_device() Message-ID: References: <20211108061349.1985579-1-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211108061349.1985579-1-baolu.lu@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 08, 2021 at 02:13:49PM +0800, Lu Baolu wrote: > Extend the scope of holding group->mutex so that it can cover the default > domain check/attachment and direct mappings of reserved regions. > > Cc: Ashish Mhetre > Fixes: 211ff31b3d33b ("iommu: Fix race condition during default domain allocation") > Signed-off-by: Lu Baolu > --- > drivers/iommu/iommu.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Applied, thanks. The __iommu_attach_device() function is called under group->mutex everywhere else, so it makes here too. Regards, Joerg