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]
Message-ID: <CAL_JsqLgPmnVjrGOcV+Qbp5ExWK25qVbShawJK96LPNE=RqNig@mail.gmail.com>
Date: Tue, 3 Sep 2024 14:20:01 -0500
From: Rob Herring <robh@...nel.org>
To: MyungJoo Ham <myungjoo.ham@...sung.com>, Kyungmin Park <kyungmin.park@...sung.com>, 
	Chanwoo Choi <cw00.choi@...sung.com>, Shawn Guo <shawnguo@...nel.org>, 
	Sascha Hauer <s.hauer@...gutronix.de>, Pengutronix Kernel Team <kernel@...gutronix.de>, 
	Fabio Estevam <festevam@...il.com>
Cc: linux-pm@...r.kernel.org, imx@...ts.linux.dev, 
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] devfreq: imx-bus: Use of_property_present()

On Wed, Jul 31, 2024 at 2:13 PM Rob Herring (Arm) <robh@...nel.org> wrote:
>
> Use of_property_present() to test for property presence rather than
> of_get_property(). This is part of a larger effort to remove callers
> of of_get_property() and similar functions. of_get_property() leaks
> the DT property data pointer which is a problem for dynamically
> allocated nodes which may be freed.
>
> Signed-off-by: Rob Herring (Arm) <robh@...nel.org>
> ---
>  drivers/devfreq/imx-bus.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Ping!

>
> diff --git a/drivers/devfreq/imx-bus.c b/drivers/devfreq/imx-bus.c
> index 86850b7dea09..49798f542d68 100644
> --- a/drivers/devfreq/imx-bus.c
> +++ b/drivers/devfreq/imx-bus.c
> @@ -59,7 +59,7 @@ static int imx_bus_init_icc(struct device *dev)
>         struct imx_bus *priv = dev_get_drvdata(dev);
>         const char *icc_driver_name;
>
> -       if (!of_get_property(dev->of_node, "#interconnect-cells", NULL))
> +       if (!of_property_present(dev->of_node, "#interconnect-cells"))
>                 return 0;
>         if (!IS_ENABLED(CONFIG_INTERCONNECT_IMX)) {
>                 dev_warn(dev, "imx interconnect drivers disabled\n");
> --
> 2.43.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ