Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp307842pxb; Fri, 15 Jan 2021 13:43:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJyW5sAt8BWE7bgGVwQbo7aU3R586yOXTHmtKKdXrMiMop+/OBKqZzdQncCsQEhKaSCGcuB5 X-Received: by 2002:a17:906:af92:: with SMTP id mj18mr9922275ejb.290.1610747017676; Fri, 15 Jan 2021 13:43:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610747017; cv=none; d=google.com; s=arc-20160816; b=HVrHJjUPkn8N3VY/jaF6Tq3YkqMyb1mYL3DJ/mwilLJL3QO1W7wgoU7DvcNdYUFOQm 9oPut5bp04LFFBaqyk4R+44D8jPZovJAFJpLg1s0AYZWONukWOB15EpTnGp0BEGlElYW l3iE/jB5fOyRLQriLIC1tOi7yKhxRoLFsb9M4doSo0Sm7QwGjhP6fHrmIT3nBMXCnnyd QjmNJJ20+8zWdBK9wur23dTHwoC1uwg2ubrO+mbNWEUgya0jAjYtT4YLKdUCwcKvHiBD 57paeZbefhbYcZjrP5BaII5C0kQ3Ytvvy7O7BzN94r+vIwuzyzVXAEVS20/1OkFkWjD7 UhtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=mtwcVH+1FaC1g+qTqjC8eRtOGlzjLJ5ctYImkEOAumA=; b=VXVv8982kt8RO4d2pJWgcv8w3aIsOvFd7GsveFbqEu/nT+CRAE+4isJb8JxMIbWq8g b8hkZ4UewW3TTDMq+0ssS6yfTiLfgArvW9nwZRdFa+fprZNZGgyQvUEVeqGnCJc/tspR tODWZUuUnkQqxWfsVRjjmR7xG+6USaFkooWZKPbimjYpDzdXTpN1CCFoJILBCKpKVpP5 fMIqkYiGUsoBfD08R8pImqq/Cr+KsR2q44iiZWEO0Q4m8LpYmQkq101lZUfTafuNp0F6 RdiKbC00YOJT5IPs4p9eYcbKEFOXbzUhsMb/gTpTu+AeRbMQnUw3heWlc0LEyGApOvia g+UQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x12si4310204ejw.662.2021.01.15.13.43.14; Fri, 15 Jan 2021 13:43:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726157AbhAOVmc (ORCPT + 99 others); Fri, 15 Jan 2021 16:42:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725934AbhAOVmb (ORCPT ); Fri, 15 Jan 2021 16:42:31 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AE55C061757; Fri, 15 Jan 2021 13:41:51 -0800 (PST) Received: from dslb-188-096-136-022.188.096.pools.vodafone-ip.de ([188.96.136.22] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1l0WRp-00052t-MJ; Fri, 15 Jan 2021 22:15:57 +0100 From: Martin Kaiser To: Nicolas Saenz Julienne , Lorenzo Pieralisi , Bjorn Helgaas , Florian Fainelli Cc: bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH v4] PCI: brcmstb: Remove chained IRQ handler and data in one go Date: Fri, 15 Jan 2021 22:15:32 +0100 Message-Id: <20210115211532.19837-1-martin@kaiser.cx> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201108184208.19790-1-martin@kaiser.cx> References: <20201108184208.19790-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Call irq_set_chained_handler_and_data() to clear the chained handler and the handler's data under irq_desc->lock. See also 2cf5a03cb29d ("PCI/keystone: Fix race in installing chained IRQ handler"). Signed-off-by: Martin Kaiser Acked-by: Florian Fainelli Acked-by: Nicolas Saenz Julienne --- Hi Lorenzo, I sent this simple patch back in November, it seems that it got lost somehow. Is there any chance that you can apply it? Thanks, Martin v4: - resend after two months - clean up the commit message while at it v3: - rewrite the commit message again. this is no race condition if we remove the interrupt handler. sorry for the noise. v2: - rewrite the commit message to clarify that this is a bugfix drivers/pci/controller/pcie-brcmstb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c index d41257f43a8f..95f6dd93ceae 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -603,8 +603,7 @@ static void brcm_msi_remove(struct brcm_pcie *pcie) if (!msi) return; - irq_set_chained_handler(msi->irq, NULL); - irq_set_handler_data(msi->irq, NULL); + irq_set_chained_handler_and_data(msi->irq, NULL, NULL); brcm_free_domains(msi); } -- 2.20.1