From patchwork Mon Feb 13 19:40:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 56520 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2537746wrn; Mon, 13 Feb 2023 11:44:06 -0800 (PST) X-Google-Smtp-Source: AK7set+Xmzk/FIXfwXRTIN8SVf/+tDoAmgiEr7y0DjX+nz5eJ74F873xUt7O1lKuQOCiETkBtqIO X-Received: by 2002:a17:907:215a:b0:8aa:bdeb:83b5 with SMTP id rk26-20020a170907215a00b008aabdeb83b5mr112825ejb.18.1676317445878; Mon, 13 Feb 2023 11:44:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676317445; cv=none; d=google.com; s=arc-20160816; b=TufYBdiwKUEc2XWj1S2NJrdo/F8KeDSNaltKlZZEtq+NxzJRmY9u4379YgviLFT5qS xDipgV2cmilrdZUgxNDiFEOS3FGvu4dHzs8o6BsGfZEdc7IJXEgktmS35qLjbuOAsOQU cLtDbzpCfc8bF58HX+SRv6r+EuGpO/lPXY3No+B0F2AxcCyeTSyPUpP9Bn7DtysK7RXM RjDAK01GSacGLPJO1cEW71y8f7jHLl2V7dSk3VLNFaNKuu5O0eG5X3ISqRh3bJWEQj5/ I3sk04E7OYkOD1Xkx93Os86XldmQUi7WApHg/6NJRdN/LhtRDjT09zmA0TEIwX7h0BwL fGeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=I3jTWrjYelcPw63MQBlHs5ntZf9rizrcUMbbhzyWiwY=; b=yz/iz9VQncMrDuwOHDPvVqqqBt6pBAtZu4Tt2X2qx4F1LX/VCr0wXHXJ8FRoF4XwoZ 6PgczrjwXl2IohyyPd0d4DtWXstpZxmq0FDZFIwbr4HBKut7nmEfQ7zT0GyGcv56sG2C EI+8S95+vEzJPKezI063BS3/49SCxEr5k8qdRaDjkJ4Z4SOuGltwuet1m3VuUeRwwX9U 88JuqZgmxUW3oWEFuDQSpV0GKEqiHMmMilXNyz9cGzsrYl0/f8qSbbtGJCvnZR0txb+P 0vvWn7PopDqkbQIKkej32v6sTH3t5tukipSy8x84fk+S6m2Qp9+KHeV/zPzpfUhodV9y lQWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=r4P442MM; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 1-20020a170906004100b008affa064028si11847087ejg.654.2023.02.13.11.43.43; Mon, 13 Feb 2023 11:44:05 -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=r4P442MM; 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 S231439AbjBMTlW (ORCPT + 99 others); Mon, 13 Feb 2023 14:41:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231357AbjBMTlE (ORCPT ); Mon, 13 Feb 2023 14:41:04 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C4D220690; Mon, 13 Feb 2023 11:40:48 -0800 (PST) Date: Mon, 13 Feb 2023 19:40:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1676317247; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I3jTWrjYelcPw63MQBlHs5ntZf9rizrcUMbbhzyWiwY=; b=r4P442MMJpPx86Pe0jndlL97Uk3DgtN6QQYJpcjH5zcR2iWdZGAlkctjSmRv4rDiq1jZfX hXzqany3xgIPCLRJxi1i6ai76Fd3Nl9q0ogP77l1z0+dKxSAAzQAjpSUJEjbq4ma6ItW4x mCwRzpN+xXEzvs52k5TjoedahVNJNHF+9bf3QnH94iJjVqTPVO92XcAa/pMOork+t1EkVK RuLvBVwpGutpdeV39ARsSAKLHlEO0lLmUY0kWB+/0vFYgQOyuZkwbSn63pGLp14aqb0o82 KOuP6iVU2jXNn7SaodoCsihybYTWo5iKYoCUQX6vzA9Poazqv8IBTf8gtHNjHg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1676317247; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I3jTWrjYelcPw63MQBlHs5ntZf9rizrcUMbbhzyWiwY=; b=+q6E7bFPxRnBO8A7sOutNVRs3OnssDbUDfCkOA/wz+SGUATx4p0jjBaoAtWFzyjBUmsGkx hNvvjhQV0PNM/XCA== From: "irqchip-bot for Johan Hovold" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-next] irqdomain: Drop bogus fwspec-mapping error handling Cc: stable@vger.kernel.org, #@tip-bot2.tec.linutronix.de, 4.8@tip-bot2.tec.linutronix.de, "Hsin-Yi Wang" , "Mark-PK Tsai" , Johan Hovold , Marc Zyngier , tglx@linutronix.de In-Reply-To: <20230213104302.17307-4-johan+linaro@kernel.org> References: <20230213104302.17307-4-johan+linaro@kernel.org> MIME-Version: 1.0 Message-ID: <167631724697.4906.5044974422442004026.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757712269741088488?= X-GMAIL-MSGID: =?utf-8?q?1757746242346639947?= The following commit has been merged into the irq/irqchip-next branch of irqchip: Commit-ID: e3b7ab025e931accdc2c12acf9b75c6197f1c062 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/e3b7ab025e931accdc2c12acf9b75c6197f1c062 Author: Johan Hovold AuthorDate: Mon, 13 Feb 2023 11:42:45 +01:00 Committer: Marc Zyngier CommitterDate: Mon, 13 Feb 2023 19:31:24 irqdomain: Drop bogus fwspec-mapping error handling In case a newly allocated IRQ ever ends up not having any associated struct irq_data it would not even be possible to dispose the mapping. Replace the bogus disposal with a WARN_ON(). This will also be used to fix a shared-interrupt mapping race, hence the CC-stable tag. Fixes: 1e2a7d78499e ("irqdomain: Don't set type when mapping an IRQ") Cc: stable@vger.kernel.org # 4.8 Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230213104302.17307-4-johan+linaro@kernel.org --- kernel/irq/irqdomain.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index f77549a..9f5b96c 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -847,13 +847,8 @@ unsigned int irq_create_fwspec_mapping(struct irq_fwspec *fwspec) } irq_data = irq_get_irq_data(virq); - if (!irq_data) { - if (irq_domain_is_hierarchy(domain)) - irq_domain_free_irqs(virq, 1); - else - irq_dispose_mapping(virq); + if (WARN_ON(!irq_data)) return 0; - } /* Store trigger type */ irqd_set_trigger_type(irq_data, type);