[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tencent_C06105A21611283E4866B846091CE7B3CF06@qq.com>
Date: Tue, 20 Jan 2026 01:55:19 +0800
From: Felix Gu <gu_0233@...com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Sudeep Holla <sudeep.holla@....com>,
Cristian Marussi <cristian.marussi@....com>, arm-scmi@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] firmware: arm_scpi: Fix a reference leak on device node
Hi Dan,
Thanks for the review.
I found this issue through code review.
From the comments and implementation, I believe this is a problem.
The caller often misses calling of_node_put(), and I have found a lot of
similar issues in the driver code.
Best regards,
Felix Gu
在 2026/1/19 3:15, Dan Carpenter 写道:
> On Fri, Jan 16, 2026 at 08:54:39PM +0800, Felix Gu wrote:
>> When calling of_parse_phandle_with_args(), the caller is responsible
>> to call of_node_put() to release the reference of device node.
>> In scpi_dev_domain_id, it does not release the reference.
>>
>> Fixes: 45ca7df7c345 ("firmware: arm_scpi: add support to populate OPPs and get transition latency")
>>
> nit: delete the blank line after the Fixes tag.
>
>> Signed-off-by: Felix Gu <gu_0233@...com>
> Did you find this issue just by reviewing the code? I read the comments
> and then looked at a sample of four other callers and none of them
> called of_node_put(). So it's a weird thing. If this is really the rule
> then we should have a static checker heuristic to enforce it.
>
> regards,
> dan carpenter
Powered by blists - more mailing lists