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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 17 Jun 2022 09:22:52 +0800 (CST)
From:   "Liang He" <windhl@....com>
To:     "Martin Blumenstingl" <martin.blumenstingl@...glemail.com>
Cc:     "Neil Armstrong" <narmstrong@...libre.com>, khilman@...libre.com,
        jbrunet@...libre.com, linux-arm-kernel@...ts.infradead.org,
        linux-amlogic@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re:Re: [PATCH] soc: amlogic: Fix refcount leak in
 meson-secure-pwrc.c




At 2022-06-17 04:17:19, "Martin Blumenstingl" <martin.blumenstingl@...glemail.com> wrote:
>Hello,
>
>On Thu, Jun 16, 2022 at 4:50 PM Liang He <windhl@....com> wrote:
>>
>> In meson_secure_pwrc_probe(), there is a refcount leak in one fail
>> path.
>>
>> Signed-off-by: Liang He <windhl@....com>
>Acked-by: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
>
>[...]
>>         pwrc = devm_kzalloc(&pdev->dev, sizeof(*pwrc), GFP_KERNEL);
>> -       if (!pwrc)
>> +       if (!pwrc) {
>> +               of_node_put(sm_np);
>>                 return -ENOMEM;
>> +       }
>Another approach would be to just move devm_kzalloc() a few lines
>further up (above of_find_compatible_node()).
>That would catch similar issues in future when someone wants to add
>more code right after devm_kzalloc(). That said, I don't think that
>this is a likely scenario so the patch is fine for me as-is.
>
>Thanks a lot for submitting this!
>
>
>Best regards,
>Martin

Thanks for your confirm.

Liang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ