Message ID | 20220601080930.31005-3-linmq006@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 3A1C3C433F5 for <linux-arm-kernel@archiver.kernel.org>; Wed, 1 Jun 2022 08:12:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Dxcf4pYAXA4f/vVUtkMWrL/3MfNtqW9jBvAXufE7k/U=; b=iE7RuWsCe0NCLn Q9UO3brc0wt0/FhyF6u3tlvOAyUtXLcPABw0wTq8ViK17PZeX5X250SYDTFp+pI2UZiK5PNhJCyDk UQjolCOJW8+nrPIOmovPojqp2Do5mzpyxEsWCfaV3cVRWCwa033MDb+9dUTStcE2pBrHHP+WmmLUp dcr7GRrSj/w5q9qEusKiol9BQUPixNk20hvBIkC6PEKWx0nUk1PTRbZEh1vGBmpa+N6BmH6PvxwYb 2tmD8+MztMSKBC4Pp4QUwbxROX42lMR7ibepzVNzlMfi4j5YIUtpCeNcvFIsJH7R0H5V4yr3S/f/M lbpiaoHTWLdfligOp1+A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwJSF-00EXoX-Aj; Wed, 01 Jun 2022 08:11:47 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwJS5-00EXlG-Qq for linux-arm-kernel@lists.infradead.org; Wed, 01 Jun 2022 08:11:39 +0000 Received: by mail-pl1-x636.google.com with SMTP id t2so1090660pld.4 for <linux-arm-kernel@lists.infradead.org>; Wed, 01 Jun 2022 01:11:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3He5zqQafCaqxIZZoOREzUNxsIzRMeOPPdePDkzSSxg=; b=qq9VhWsouBy8dPsUw0DdBt28a/qRbqk696UR/zScNQXa6Pi7KY2McPssAJ1mKoUkv7 uVrRQm6pZstAqrdUSPKX87knMJV4KXUA3Aeb/Tt+7hczVx/aSq5wQazrO/5unjQ1r3df pb/pROCHQc7RQwCBCEa/bCDOqDzviTCL1mRVgUbNg7bJxIPlGlr3D6l0FI4xvrUjdZRN hv4WsyIDc/y+LByUw3u1AgTorxoUq8AVsG60WdihRWp5u2/ceoThtMTxZJihoZ8MAcY/ OnIaoliAV5+me8384xFFMQRbW57UORsgKmj1ZDNILAnvckpLK7YGwh1osExA2jMN2+X6 7z+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3He5zqQafCaqxIZZoOREzUNxsIzRMeOPPdePDkzSSxg=; b=U813qpNZ5plnWuP0EqGGgWHWF4r/1MUr1rP0OiZaQ12+qLav6riD5Tn87LI7k5Tvto jIkiC+JB0Qhkj4r81gvswXalG1U7Ijy3vDJSRHngqDUCxziz+x79cEbrPlWjJnBpWm0H sVV7fg4bLQDaaze9QDAQTeuN1sF+IeIGF5QtlpAGf2NGxvSOJkvuWjTrqW5zpZtW8cI2 cI9CmwjGG3OC6u/tysbLVZ/AzLBzplN0cAgot2vigrq8CfJ/HNamQD32h2czREujtyEQ m/ogx12j+XG36qde5PuymMkJOWg8LMqX//k2qulkzqGf1ozpj4JCNcz1vcdW+8t5MTc7 5pFg== X-Gm-Message-State: AOAM533poGGqHEfhvoBT6giT6AiSFLdvPXgG6jf9MZ1X5NJdOB7uH21m 6PeUQELrh4rgwDRqCHhX/3I= X-Google-Smtp-Source: ABdhPJzBCG24CTqcAbxbuUX+p7x/yKqMY2QNv/dS6wzJy4NlNTOe030W2heDInH+ViGtU8VE+LwDmg== X-Received: by 2002:a17:902:e484:b0:164:1c:57a with SMTP id i4-20020a170902e48400b00164001c057amr8152447ple.12.1654071097415; Wed, 01 Jun 2022 01:11:37 -0700 (PDT) Received: from localhost.localdomain ([202.120.234.246]) by smtp.googlemail.com with ESMTPSA id y1-20020a17090ad0c100b001e2f3831102sm792288pjw.17.2022.06.01.01.11.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 01:11:36 -0700 (PDT) From: Miaoqian Lin <linmq006@gmail.com> To: Hector Martin <marcan@marcan.st>, Sven Peter <sven@svenpeter.dev>, Alyssa Rosenzweig <alyssa@rosenzweig.io>, Thomas Gleixner <tglx@linutronix.de>, Marc Zyngier <maz@kernel.org>, Linus Walleij <linus.walleij@linaro.org>, Bert Vermeulen <bert@biot.com>, John Crispin <john@phrozen.org>, Birger Koblitz <mail@birger-koblitz.de>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Miaoqian Lin <linmq006@gmail.com> Subject: [PATCH 2/6] irqchip/apple-aic: Fix refcount leak in build_fiq_affinity Date: Wed, 1 Jun 2022 12:09:26 +0400 Message-Id: <20220601080930.31005-3-linmq006@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220601080930.31005-1-linmq006@gmail.com> References: <20220601080930.31005-1-linmq006@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220601_011137_910397_5D296E0E X-CRM114-Status: GOOD ( 12.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
irqchip: Fix some refcount leaks
|
expand
|
diff --git a/drivers/irqchip/irq-apple-aic.c b/drivers/irqchip/irq-apple-aic.c index 12dd48727a15..478d0af16d9f 100644 --- a/drivers/irqchip/irq-apple-aic.c +++ b/drivers/irqchip/irq-apple-aic.c @@ -1035,6 +1035,7 @@ static void build_fiq_affinity(struct aic_irq_chip *ic, struct device_node *aff) continue; cpu = of_cpu_node_to_id(cpu_node); + of_node_put(cpu_node); if (WARN_ON(cpu < 0)) continue;
of_find_node_by_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: a5e8801202b3 ("irqchip/apple-aic: Parse FIQ affinities from device-tree") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> --- drivers/irqchip/irq-apple-aic.c | 1 + 1 file changed, 1 insertion(+)