Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4850790iog; Wed, 22 Jun 2022 07:05:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sb+6jr+sLVW23ZNnJ2gjioRwx+9NJcba4Vs8brga0z7nbWgvScR/QIH6ItzMrTr8Y88YC2 X-Received: by 2002:a63:3848:0:b0:40c:8ad3:d170 with SMTP id h8-20020a633848000000b0040c8ad3d170mr3062205pgn.175.1655906720529; Wed, 22 Jun 2022 07:05:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655906720; cv=none; d=google.com; s=arc-20160816; b=WAOZcQ8Pd5Z0xBFcx562dKSDFIGncqugMXch3/cxCmG1XZo5UXqPq15XzICSnQfIZl FVxeoEGzNmavFBo6lnSO/s+1DidueR76uwZFFIBe3gI53ZaSwZFOW7crUa8rOS1lP/3H 9Lf9j3Ace+X2CsMgOacpV9vy8IQ6OJ9bP9SZHALfTSmT69XctzqKAadOvXQLmXP+Cq5U zqOgmVKzOOckkpQHW5jv15GgiH6OOHEr4YxQTnTXbhkowW3elcyQC/LFXBZzjoUMNb7D D/3PUpgitX92Mu3KY0pRuXj0lKRgXoU98iuwGs/uA7sK1eMdeyvzl6vb5pm/ze1lEevu +ZZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=67yISJeGbMBfRouD+iI161Nl4+FkiAWRitrUJKea00s=; b=rtDc5p8S1Xtx1f4tXUZ72f7ofOcsX+fmoVYElDhO1XanUp4cE/KGgkXKGxgEdpDpgy bKU2zsmyogUUKl8bRrvWg7xna8KS7S35I1ZSwnxKgWrjs9MoLFupcFpv5viedrnC2dR3 gZWIYQ7DVZOpD44/jH98UY5ys539tZGFVAjTkKVgVzeedFcHw4QiLX0gW5+Zkfisso7w n4madXNZyA36grS5FgWW11TMfeEmuDvv/S/1t5KmyBJlkBE85Tupqvy67pvVXZHQnPFt Tpt7j+cUyevT6fphaPJ4JaH3zcPPOc2itebghHuNrVvf8GaLEIgAwf4aNhy4iUTLueOO 9gJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b7-20020a170902e94700b0015e8daafcb0si21753080pll.239.2022.06.22.07.05.06; Wed, 22 Jun 2022 07:05:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239195AbiFVNmU (ORCPT + 99 others); Wed, 22 Jun 2022 09:42:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344776AbiFVNmN (ORCPT ); Wed, 22 Jun 2022 09:42:13 -0400 Received: from theia.8bytes.org (8bytes.org [81.169.241.247]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AFBD2E0A5 for ; Wed, 22 Jun 2022 06:42:12 -0700 (PDT) Received: by theia.8bytes.org (Postfix, from userid 1000) id 314092D0; Wed, 22 Jun 2022 15:42:10 +0200 (CEST) Date: Wed, 22 Jun 2022 15:42:08 +0200 From: Joerg Roedel To: Robin Murphy Cc: yf.wang@mediatek.com, Miles Chen , wsd_upstream@mediatek.com, open list , Libo Kang , "open list:IOMMU DRIVERS" , "moderated list:ARM/Mediatek SoC support" , Ning Li , Matthias Brugger , Will Deacon , "moderated list:ARM/Mediatek SoC support" Subject: Re: [PATCH] iommu/dma: Fix race condition during iova_domain initialization Message-ID: References: <20220530120748.31733-1-yf.wang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 22, 2022 at 02:27:57PM +0100, Robin Murphy wrote: > Apologies, I did spot this before, I've just been tied up with other things > and dropping everything non-critical on the floor, so didn't get round to > replying before it slipped my mind again. > > In summary, I hate it, but mostly because the whole situation of calling > iommu_probe_device off the back of driver probe is fundamentally broken. I'm > still a few steps away from fixing that properly, at which point I can just > as well rip all these little bodges out again. If it really does need > mitigating in the meantime (i.e. this is real-world async probe, not just > some contrived testcase), then I can't easily think of any cleaner hack, so, > > Acked-by: Robin Murphy Alright, applied this now.