From patchwork Mon Jan 2 08:28:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaoqian Lin X-Patchwork-Id: 38028 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4067719wrt; Mon, 2 Jan 2023 00:32:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXtIduahoLiBFZr92+R1HqFGC/+66HLCVprwNnszY2DrNqwBO2Dhh/jmF3AxHo+8cdB10PWd X-Received: by 2002:a05:6402:3706:b0:472:9af1:163f with SMTP id ek6-20020a056402370600b004729af1163fmr35071572edb.37.1672648339614; Mon, 02 Jan 2023 00:32:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672648339; cv=none; d=google.com; s=arc-20160816; b=g4rYxgWf//tVKtYMxiIwEum4T07XLMqKQh2Kfyjd78V7NRihUm/qv/sf1g4txr6xUF Wv6MDzt0/EZPDpB7HnP5Fr7e72m7FlPJjSCDmFMaKZ30R1JAqvUt3rKlp8XESajoEGcA c27EuZApsau9bLp3k6aDhtFX/u70VLGOip4ZKjmDMfvtD5/i9l4PsZyDZQx7KMF2bmWp CwC0uE693i1FmurIyWcbOHDxegY71JyIdwNo81kRJpcDS4UuTf4b2L1iDzo0cFTILmwB CT332bpxVGhCAQW1L0UxQEvkx7uLdB+zPrduMiq0+Kni0CFANXApEA6a2pVPwydXaYdR HnKg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=tWYzTA7raDtUxD/VqUrbyJ284rX1lgj8dyWdOkvF1/E=; b=OtjAdbnnL4cqUVPBb+51qnPuDYr8mgkXcRJ5y/UvpsgbMgPEjMNnRORzh9UKxor6l6 fsDXshbcHnBthms8Duoj4FMZyOArUQByX7T5iz9JvWdKshKkb+R5VcDQZ/c5GPj4G6XY 2E24+UGBB0IpEzFPRc3FqYL2H8yjwuy/aL65lWwSvewYF9j/jFYn7HlRbvGhtI/TG+Z8 4mjIeP8hTaU4Auq0c4l0bJZjr8hILvv36jiKYlxnITDsPc7kSoW8sOSwqyu5S8c+n7Hp aRUV6YCbiNwJlnG2xLXysD/kCJZ3yeB+KnyMJtxkqDo0VWYkHuTylwqS2AX5uHbpcnC5 zWdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NYz9nZkW; 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=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v10-20020a056402348a00b0045cd68a2bc5si27022178edc.17.2023.01.02.00.31.56; Mon, 02 Jan 2023 00:32:19 -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=@gmail.com header.s=20210112 header.b=NYz9nZkW; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231771AbjABI2o (ORCPT + 99 others); Mon, 2 Jan 2023 03:28:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232032AbjABI20 (ORCPT ); Mon, 2 Jan 2023 03:28:26 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C1392186 for ; Mon, 2 Jan 2023 00:28:20 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id u4-20020a17090a518400b00223f7eba2c4so27642257pjh.5 for ; Mon, 02 Jan 2023 00:28:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=tWYzTA7raDtUxD/VqUrbyJ284rX1lgj8dyWdOkvF1/E=; b=NYz9nZkWD8n7Y+KSMqiNTxN+6FhHH3GXtAGRsxrjjih7ndCEXFdM0rMvMEySOwDxA+ xLqAKs8/8C+3uIu3WtNB+TCcHonmimcA2f/gaJAfiM/o+UQJqULcllRH2j5x6uzkHuE+ zi9stt2ateVWUyHyovEc8o+r6aK+n9fO8Gtui/6sTy97uwfctvBGAeiySoOVgtzFrZ7r UXbZWKKKQc8nm/FjDKa3hwczLw3X6cthv3U1qN1VeNoRyVc4g7U7ivYqFWYec66nYCPm oqEmqO6U2QYkouRMyzxijwLYxDbjTxWITCxbmd3eE4kXcyeQEbDNR3K9TonsB4XLjABS k8jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tWYzTA7raDtUxD/VqUrbyJ284rX1lgj8dyWdOkvF1/E=; b=HGldbAa3dmOsEnsGtyJwEJYRtSLKqCKGdA3GcHKMC4rcGdrlWJA299H/Ln6JwpNx0x biNLeMRDSXOAJ5dNNXMBeX1PwveCuT80cfvybgiFjxvjD9upiPG6Hk9fyDXgG7AMFGI8 LlMFIfln+q1TGgw6sbSDCV7/802Saejb3DayuimCZVpN/yCfc0/ic5VIfKha/JF4Fw/T HsjF7y93jy+N/Es7VGlqEfZGgvaxK4XV+4HMamvqGp1DuY1QB2DCgLyfbxP7ca9e4TFe Kuj10EhTlpaS8cF0peyCXxqkd9BMsuW/k4WH4oT1YLL4nPNXPNghuWh+0Il6skeT4EWz Y1ig== X-Gm-Message-State: AFqh2kobRmKInL0t3Fy655KnZp7fDVw49SQMn5sL5H2anyXc3Gq9vDKD 3xgq/Ba2vuddu/rSZOgRl5Y8O2sCyuxgAaSb X-Received: by 2002:a05:6a20:13a6:b0:af:9c75:6699 with SMTP id w38-20020a056a2013a600b000af9c756699mr67051926pzh.1.1672648099525; Mon, 02 Jan 2023 00:28:19 -0800 (PST) Received: from localhost.localdomain ([202.120.234.246]) by smtp.googlemail.com with ESMTPSA id q6-20020a655246000000b004468cb97c01sm16697724pgp.56.2023.01.02.00.28.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Jan 2023 00:28:18 -0800 (PST) From: Miaoqian Lin To: Tsahee Zidenberg , Antoine Tenart , Thomas Gleixner , Marc Zyngier , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: linmq006@gmail.com Subject: [PATCH] irqchip/alpine-msi: Fix refcount leak in alpine_msix_init_domains Date: Mon, 2 Jan 2023 12:28:10 +0400 Message-Id: <20230102082811.3947760-1-linmq006@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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?1753898905416116088?= X-GMAIL-MSGID: =?utf-8?q?1753898905416116088?= of_irq_find_parent() returns a node pointer with refcount incremented, We should use of_node_put() on it when not needed anymore. Add missing of_node_put() to avoid refcount leak. Fixes: e6b78f2c3e14 ("irqchip: Add the Alpine MSIX interrupt controller") Signed-off-by: Miaoqian Lin --- drivers/irqchip/irq-alpine-msi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/irqchip/irq-alpine-msi.c b/drivers/irqchip/irq-alpine-msi.c index 5ddb8e578ac6..fc1ef7de3797 100644 --- a/drivers/irqchip/irq-alpine-msi.c +++ b/drivers/irqchip/irq-alpine-msi.c @@ -199,6 +199,7 @@ static int alpine_msix_init_domains(struct alpine_msix_data *priv, } gic_domain = irq_find_host(gic_node); + of_node_put(gic_node); if (!gic_domain) { pr_err("Failed to find the GIC domain\n"); return -ENXIO;