lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e6d26f57-1871-48f0-9db5-8f2b21fb3635@oss.qualcomm.com>
Date: Tue, 18 Nov 2025 20:48:33 +0530
From: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@....qualcomm.com>
To: Krzysztof Kozlowski <krzk@...nel.org>,
        Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
Cc: Konrad Dybcio <konrad.dybcio@....qualcomm.com>,
        Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konradybcio@...nel.org>, linux-arm-msm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/10] soc: qcom: aoss: Use __cleanup() for device_node
 pointers


On 11/18/2025 6:02 PM, Krzysztof Kozlowski wrote:
> On 18/11/2025 13:25, Dmitry Baryshkov wrote:
>> On Tue, Nov 18, 2025 at 12:39:51PM +0100, Krzysztof Kozlowski wrote:
>>> On 17/11/2025 12:35, Konrad Dybcio wrote:
>>>> On 11/17/25 5:51 AM, Kathiravan Thirumoorthy wrote:
>>>>> Make use of the __cleanup() attribute for device_node pointers to simplify
>>>>> resource management and remove explicit of_node_put() calls.
>>>>>
>>>>> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@....qualcomm.com>
>>>>> ---
>>>> Reviewed-by: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
>>> This is obviously wrong and not helpful patch.
>> Describing why it is wrong would be helpful (or having a pointer to an
>> explanation). Bear in mind people who read email archives and find this
>> very brief note.
> I gave some rationale in other patches, but summarizing:
> 1. It is against cleanup.h - author did not bother to read it - which
> clearly asks for constructor with declaration.

Thanks for pointing this out. I understood that w/o NULL initialization 
we will be freeing some dangling pointers but looks like there are other 
cases also. I agree that I overlooked the details in cleanup.h.Apologies 
for the oversight and for taking up everyone’s time. Will take care of 
this going forward!

> This was discussed many
> times in the list, including many bugs and explicit checkpatch warning
> (on LKML) because people don't bother to read cleanup.h.
>
> 2. It makes simple get+put code complicated, not simpler.
>
> 3. It grows the scope of OF reference without benefits.
>
> 4. This driver was already reviewed and simplified so author should go
> back and think why this was left alone (would save a lot of trouble).
>
> Best regards,
> Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ