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 B647223315A; Mon, 9 Dec 2024 20:32:02 +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=1733776322; cv=none; b=TRXlL6cMY4rcYmV2677XHtPZQNCjv51o6DJIKThRagJDIoUzIwaJIoRMWXkTJZPaiv3lVmKj0/uj/uMu+uDK1nstRfeGvs926nsdCo4YkeIH5MLlLCOSg2DfePFqAHAmmZto0MKPsD28d8dbDDx/4UWniN8pcYfgOT5+YTr/hy8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733776322; c=relaxed/simple; bh=wpgzYV9P/iqfJu/uKuikGtFuJPC6IBtMiMfoMSv56sM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QSUb9r05Pt87H818KIvN/kfzlTU+Cr1wvkIFE/38QCTgcLx8VArWkOsWbEXULpv+R2ELFDdk5mvZXvJ3C6PYjQjwuJ/pKIQli192n0mlPgl6M34nhv+Fos59rqZqmXVPvUwDxy1lD4nkBCL7U8lhPPPt9Oa9EIHWYbY2PuGiEfo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Hc3HPJWh; 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="Hc3HPJWh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFAF4C4CED1; Mon, 9 Dec 2024 20:32:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733776322; bh=wpgzYV9P/iqfJu/uKuikGtFuJPC6IBtMiMfoMSv56sM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Hc3HPJWhRXcHBxhmPwUYAYM77Ohadjum2ZaPWO+920b5ZpqNB17fExI0q179iPPwU Tdp5zJajw4LlTgRYxYdKHjde4CvcKowmgHaOzg7uqbwBU+8Uyj1mPD/wgKjrRBZvha QltwfxUBz1kAfl3S4s72woG4sJKt+m1aidlCTh5SmVNez/SrbnMpEWcZYxlQEhRJta Cl1SedwtzZnE45u0eVpxeKTn21ieP29RLbj1vs+i6kJsoTp6eytB7c6FvLEdpYw8kf e9Sfy1AmzyQD43XeOYRrToZc3dwK4fJHI8evPjj5+deqvrk2nRzbGmLHe0rQcpMrEs k5JO8Nr42k/DQ== Date: Mon, 9 Dec 2024 14:32:00 -0600 From: Rob Herring To: Zijun Hu Cc: Saravana Kannan , Leif Lindholm , Stephen Boyd , Maxime Ripard , Robin Murphy , Grant Likely , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Zijun Hu , stable@vger.kernel.org Subject: Re: [PATCH 04/10] of: Fix refcount leakage for OF node returned by __of_get_dma_parent() Message-ID: <20241209203200.GA925532-robh@kernel.org> References: <20241206-of_core_fix-v1-0-dc28ed56bec3@quicinc.com> <20241206-of_core_fix-v1-4-dc28ed56bec3@quicinc.com> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241206-of_core_fix-v1-4-dc28ed56bec3@quicinc.com> On Fri, Dec 06, 2024 at 08:52:30AM +0800, Zijun Hu wrote: > From: Zijun Hu > > __of_get_dma_parent() returns OF device node @args.np, but the node's > refcount is increased twice, by both of_parse_phandle_with_args() and > of_node_get(), so causes refcount leakage for the node. > > Fix by directly returning the node got by of_parse_phandle_with_args(). > > Fixes: f83a6e5dea6c ("of: address: Add support for the parent DMA bus") > Cc: stable@vger.kernel.org > Signed-off-by: Zijun Hu > --- > drivers/of/address.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks. Rob