From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 E87CEC5320E for ; Tue, 20 Aug 2024 08:51:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wAQy6RHwFXkSGxU10P40d6u631xxr3DgBrLKhyx0lgk=; b=z2q0eUpSsE4h7ClSruoncOTJ/f Ni4Z5jp0jnUt22X43hXy7Nw///PMzvIydPcT7ngixOmdW3indgZFgXRjKy8tsfmrx2prx4cgdc3Bo VsLZ0jqF+LKNOHLuanwcNWdiyjgs8SU6WCaQ1wAInzwjyqfnGz3R9eI2FHn5iZ4XgzRwBqtzr/2tX utrTpO4+k9DyzMgyE/gqawYmwpJx5sovniKvrvZJ+xGFTeNqUlBkNHNiBSBa5ASpEOtoGKx8wzAZS pxV8S6JPZU+ivEwlFANkS7oAAxqDvwA98VbFexQFyffL3K79k3usOmb0r3SgU1bRc/IL/f6k5oMGc DF38wVCQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgKaE-00000004SEy-0Urs; Tue, 20 Aug 2024 08:51:18 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgKZX-00000004S8M-15Jt for linux-arm-kernel@lists.infradead.org; Tue, 20 Aug 2024 08:50:36 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 8A22DCE09D0; Tue, 20 Aug 2024 08:50:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BD29C4AF0B; Tue, 20 Aug 2024 08:50:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724143830; bh=tcAL/DKKMYEH6sgIONYpEHFf928x+8OcIG6Of0r3HaU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Wf0NewzOa4AqK793Zsy/0Cdg1bxtXHzLeD3U+bpWJ98xqPuMnJRxAcYf0B3cIqFfv cs3V1A3BfaUnpKP8CDHwJRb+RMSxYKgu1KKzilDX7Pid6ttZEsyWkgOMrD3f974qb8 u+vd4qqYLoJaIAd+h/mgw6ojWtrRJQflirDoKMs+9Da9TK7F66mIwxrYBWP0+deAO9 qW80+w9EWVq1yGQW9vkuUzBNeL2h++Z7p2WUFlsIeR0AL7XU/c6olXZ9IK4X+Deq7Z eemmro7dfyxFJsFjJsDqrLUL8ix7N/S0eYJDFo5ZwD33d3eAOGBK+yrL83b8uzCWph Tmf66obmasQEw== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sgKZP-005CPB-Sw; Tue, 20 Aug 2024 09:50:27 +0100 Date: Tue, 20 Aug 2024 09:50:27 +0100 Message-ID: <86v7zvy3vw.wl-maz@kernel.org> From: Marc Zyngier To: Ma Ke Cc: tglx@linutronix.de, Suravee.Suthikulpanit@amd.com, akpm@linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2] irqchip/gic-v2m: Fix refcount leak in gicv2m_of_init In-Reply-To: <20240820075401.1206522-1-make24@iscas.ac.cn> References: <20240820075401.1206522-1-make24@iscas.ac.cn> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.4 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: make24@iscas.ac.cn, tglx@linutronix.de, Suravee.Suthikulpanit@amd.com, akpm@linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240820_015035_491898_55C877D1 X-CRM114-Status: GOOD ( 11.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 20 Aug 2024 08:54:01 +0100, Ma Ke wrote: > > Add the missing of_node_put() to release the refcount incremented > by of_find_matching_node(). This doesn't reflect the patch anymore. Something like this should be closer to reality: "We fail to perform an of_node_put() when of_address_to_resource() fails, leading to a refcount leak. Address this by moving the error handling path outside of the loop and making it common to all failure modes." With the commit message fixed: Reviewed-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible.