From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796043679; b=rN7O5gYMa2ZGi0Ki0WBjsUmDrJy5FVKh5ujdMJYG23Yi9DKrszNjjA2YMiYZqiaDwQ8E ZfVdjkiPoaZ0QWtO1rOGsYv8BZGzH93m86HS45VkLPYSewBszDZjQK9PY/NNdYPp0d83p +5Qb74zECxvg98qHYrKStq+njWyiwcnsUaWCEAPzzWH7lXxfo78RwHfJDXfMwKKyovsEB +tuhcEDLm2HEaNJE/vPMMhzgaD8n2tb6cL8EIGSHyKYHP0PoRxKliNxglbnBOvbxVlsAr r0DpePfb1iw/LZx1YpgGGIzc5u6CxmKhbPkJhKSY7wjhLlGKZUs6/j3IEtvri56YFLA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796043679; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=FSeruKpcq/5TWSq9bhfaUYkE+uSC/1/8kjcDXRBKDag=; b=omj2CtUTYLdqMxn0uMwNoVSLEkf58DVaO1KSDrAUtsgCzWsqqzoof7/7FcaTWxdJIdKB 4sN1xPXYbhqPzlk5Ym+83DUBJd1XkVydeYs1iNhgGDSIS+UT2RrnVfG0z49XnXqpFxsBE mbJ9YfaKP8o8BRnyu2vDS2QHT1+q8fAZ4YIeF9FiSnAp3DjEKLvUCFcEfCKw6i6ETBtjU yifOMG0/Pr1TAKDSo8dyPYiq2DRbebGU60+6GznrtXQ+jpuC0qvPXfdmAy6fslsyM+CCt eTYX9MkpCUVRfG3uLjr8/8I7eVFIEh/eFLVelHfOS6WeP4sOQ3uCQyy8u4CqBvDNlNw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=CadjulD5; arc=none smtp.remote-ip=156.67.10.101 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B95DA606A325 for ; Mon, 30 Nov 2026 13:01:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B95DA606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=CadjulD5 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=FSeruKpcq/5TWSq9bhfaUYkE+uSC/1/8kjcDXRBKDag=; b=CadjulD513q/RW0H4sI8LOquYV 4vRUu5YkoghhkHLrA07TYRJp8FbC5IgQpKTZFlETkGg0/aUwis442Q9uOxLx0FkcUIGRTn/SqF+8J h7U5Ih+VqMeZl02GQ0M07YWi9F0gkM0OnP/+eKQm75K+TTJzIr3A8xWqWjqvfV9VDBfw=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1xY10E-002Mh9-I6; Mon, 30 Nov 2026 14:01:06 +0100 Date: Mon, 30 Nov 2026 14:01:06 +0100 From: Andrew Lunn To: zhaofeng2 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] soc: dove: fix OF node leaks in dove_init_pmu() Message-ID: References: <20261127074219.1188-1-zhaofeng2@cmss.chinamobile.com> <20261130033828.1607-1-zhaofeng2@cmss.chinamobile.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261130033828.1607-1-zhaofeng2@cmss.chinamobile.com> On Mon, Nov 30, 2026 at 11:38:28AM +0800, zhaofeng2 wrote: > From: Zhao Feng > > dove_init_pmu() takes two OF node references: np_pmu via > of_find_compatible_node() and domains_node via of_get_child_by_name(). > On success np_pmu is transferred to the long-lived pmu_data > (pmu->of_node), but several paths leak references: > > - missing domains node: np_pmu is leaked; > - pmu allocation failure: np_pmu and domains_node are leaked; > - of_iomap() failure: both are leaked (pmu is freed, dropping the > only holder of the np_pmu reference); > - success: domains_node is never released after the child-node > loop. > > Drop the references on all these paths. The np_pmu reference on the > success path stays with pmu->of_node, which lives for the lifetime > of the system. > > Fixes: 44e259ac909f ("ARM: dove: create a proper PMU driver for power domains, PMU IRQs and resets") > Signed-off-by: Zhao Feng Who does this bother? https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html Please drop the fixes tag. Andrew