From mboxrd@z Thu Jan 1 00:00:00 1970 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 smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5A176C433F5 for ; Mon, 6 Dec 2021 11:40:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id C8FD540580; Mon, 6 Dec 2021 11:40:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t1u13IClU2T1; Mon, 6 Dec 2021 11:40:19 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id D592840544; Mon, 6 Dec 2021 11:40:17 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9D9B8C002F; Mon, 6 Dec 2021 11:40:17 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 58037C0012 for ; Mon, 6 Dec 2021 11:40:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 2E33040331 for ; Mon, 6 Dec 2021 11:40:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X6LFmSoAofOB for ; Mon, 6 Dec 2021 11:40:15 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by smtp2.osuosl.org (Postfix) with ESMTPS id 62FA740436 for ; Mon, 6 Dec 2021 11:40:15 +0000 (UTC) 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 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-Disposition: inline In-Reply-To: <20211108061349.1985579-1-baolu.lu@linux.intel.com> Cc: kevin.tian@intel.com, ashok.raj@intel.com, Will Deacon , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Jason Gunthorpe , Ashish Mhetre X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" 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 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu