Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp5562152rwb; Tue, 17 Jan 2023 15:47:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXuv6HFgN+5d81McDF5DCvQSpa6m3OiPY9Yf7I3A0GObd6iFe0rMX76LM0GDOi5F831Yh6wq X-Received: by 2002:a62:3007:0:b0:587:8d47:acdd with SMTP id w7-20020a623007000000b005878d47acddmr5445110pfw.34.1673999230055; Tue, 17 Jan 2023 15:47:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673999230; cv=none; d=google.com; s=arc-20160816; b=Wrr2R+qdATS4nBaiM96BLs1n6dda/yfAvK+ZrxHkKuvhiWPP92kHLKBWhlf7gCNv3g 0uLOb+PRM2J/A+FAOR97uNR9YNbOB1xhOeFsSi5MB22j8SUOXj5k+h8JJYyFfSxG15FS RrFsk3mfRiqiSNz5vPnr2P+dkU3AUxg8jDz8uONpUGVDZOtHQLXGWAMa8/KLIbwvj2Gf teWz6Nmv5LX1anrLuQ8e4Sns5CSu++jER1Ud7XwIqXb1xBs836u2I8CNulc6LzlPAlmo rmludYBbm0JRsXqKWNTYd50+v0pb2vH4tNw3QqvgxmviIM96bbVdm622PHaUHN8CWxUL 46hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=uFt1AJQ9n7qGyugZoMBl7mWBYMnX6oI/Uf8Kag8wje0=; b=UewY0V9qfyqlqsHufimq5ZQCNa1USDNGTRV7MiFFXOY6iB+uNxoTrclLDEGjtnDdxJ n1HbFDMRRsy/c5wjmCp1ZHLb5MEq020mqM0c/h0+rS9OCO1k3JTUAWiwdSW6zakJ65CV s6/1LIwCDoHbRGliVdrsD+u/CNgKLDMaEFJlfGdexV4ugZyh9wyXGv+uLzZZbOf/lCB1 V4qA2f4gCKR0L9GyTvfmz5ZPHYyQMypNqoKprf+btiS42XAISwvHJi7HQ8vXRrWnZPN1 hcTfbH4jJzpGoOsG4AX2CfD9itqNz+/wOS1Ae27Eeo4DX3BNUpQ5BLPR54tb/Su5ulXy /tuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=NvUPD+FW; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h16-20020a056a00231000b0056c882d3d06si36663046pfh.199.2023.01.17.15.47.04; Tue, 17 Jan 2023 15:47:10 -0800 (PST) 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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=NvUPD+FW; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229937AbjAQXfV (ORCPT + 46 others); Tue, 17 Jan 2023 18:35:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230051AbjAQXeb (ORCPT ); Tue, 17 Jan 2023 18:34:31 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CC3F10F2; Tue, 17 Jan 2023 13:20:48 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1673990446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=uFt1AJQ9n7qGyugZoMBl7mWBYMnX6oI/Uf8Kag8wje0=; b=NvUPD+FWtELzTgMxbE9uDL2FKa1hRDnJvkJKh6TK1nwWJdESVKTzRLOtgwCAnRCZv94iG+ 8YNU6ZRAyiWfB8WmDGifmKKfoQKiBJjTpCE1At9hpzbwQQXI0vT/k2mOZi8p6rzV01/KVs cSxE7XL2+1bVq9jZdmzR+YztzHYBOh/Q9vWORgjXiYi9Yj187fbjctDCb11f+ubqKjKEqU ZF23xjhRzJWOopLQlr71d5J6EsZDSYKBJWmq2o6CbZ1bbtZ6LoCVpGRw3W9IF83j3eTN+7 VhLkf2sBDdRShXWGyjbkuCQpbYmiujP7rTRBPGmiSiYSLf0USsqg8oZpmpKtVA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1673990446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=uFt1AJQ9n7qGyugZoMBl7mWBYMnX6oI/Uf8Kag8wje0=; b=/Ktw//WEB6yelYeDZAO9repdpMW0rl4hya6E88cwj+07K0+gYzAbmtZI1P/iOX6LTBHEBN IczWgVOGX/eVb0AQ== To: Johan Hovold , Marc Zyngier Cc: x86@kernel.org, platform-driver-x86@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , Hsin-Yi Wang , Mark-PK Tsai Subject: Re: [PATCH v4 04/19] irqdomain: Fix association race In-Reply-To: <20230116135044.14998-5-johan+linaro@kernel.org> References: <20230116135044.14998-1-johan+linaro@kernel.org> <20230116135044.14998-5-johan+linaro@kernel.org> Date: Tue, 17 Jan 2023 22:20:46 +0100 Message-ID: <874jsoluxd.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS 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 Mon, Jan 16 2023 at 14:50, Johan Hovold wrote: > The sanity check for an already mapped virq was done outside of the s/was/is/ > irq_domain_mutex-protected section which meant that an (unlikely) racing s/meant/means/ > association may not be detected. You describe the status quo and then correctly what the fix is: > Fix this by factoring out the association implementation, which will > also be used in follow-on changes to rework the locking. Otherwise your fix fixes something which existed in the past, no? Thanks, tglx