From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE1CB18E352; Tue, 20 Aug 2024 08:50:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724143831; cv=none; b=jUEFr8I4t8PE82wqEifBJ+Yl+NQrhbWww5BN3X+6ic8SVfYRDtbXywUvcGhIjlLC5EP4xV1r2xpbF1osPwp7WobH0jOtO3Wgz9WP+3xVHPfcXRAx1olTbzjgR4PeLHbhDMKYY9QlTj3skU0JBaNWsE4frBHJGY5Qz5leUmPoYgo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724143831; c=relaxed/simple; bh=tcAL/DKKMYEH6sgIONYpEHFf928x+8OcIG6Of0r3HaU=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=pRBaBznv1lfoqmhFNyeGciwvHXMO4bwANJQhc4imqRT8XKJmuKgPZz0qgHRuPX5Eu3jPGii1y/MsAgHKWVZOtHhRkkwJdhJ5sLIzuelIh4p2T55xR3xLBQpKVg/NxntyMS9G6uM5Yu6emL6V1QRX+dezWeYjQtoHSK1svF9K5g0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Wf0NewzO; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Wf0NewzO" 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) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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.