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: <Z0iw4Hwltov+x89b@duo.ucw.cz>
Date: Thu, 28 Nov 2024 19:05:20 +0100
From: Pavel Machek <pavel@...x.de>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, uwu@...nowy.me
Cc: stable@...r.kernel.org, patches@...ts.linux.dev,
	linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
	akpm@...ux-foundation.org, linux@...ck-us.net, shuah@...nel.org,
	patches@...nelci.org, lkft-triage@...ts.linaro.org, pavel@...x.de,
	jonathanh@...dia.com, f.fainelli@...il.com,
	sudipm.mukherjee@...il.com, srw@...dewatkins.net, rwarsow@....de,
	conor@...nel.org, hargar@...rosoft.com, broonie@...nel.org
Subject: Re: [PATCH 6.1 00/98] 6.1.117-rc1 review

Hi!

> Icenowy Zheng <uwu@...nowy.me>
>     thermal/of: support thermal zones w/o trips subnode

This seems to introduce memory leak.

+++ b/drivers/thermal/thermal_of.c
@@ -238,18 +238,15 @@ static struct thermal_trip *thermal_of_trips_init(struct device_node *np
, int *n
...     
        trips = of_get_child_by_name(np, "trips");
-       if (!trips) {
-               pr_err("Failed to find 'trips' node\n");
-               return ERR_PTR(-EINVAL);
-       }
+       if (!trips)
+               return NULL;
 
        count = of_get_child_count(trips);
-       if (!count) {
-               pr_err("No trip point defined\n");
-               ret = -EINVAL;
-               goto out_of_node_put;
-       }
+       if (!count)
+               return NULL;


In the !count case, we still need to do the of_node_put, AFAICT.

Best regards,
								Pavel
-- 
DENX Software Engineering GmbH,        Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ