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: <67698385-b2fe-2de9-9775-9f6320a0e9e3@gmx.de>
Date:   Thu, 7 Apr 2022 21:41:16 +0200
From:   Helge Deller <deller@....de>
To:     cgel.zte@...il.com, s.hauer@...gutronix.de, kernel@...gutronix.de
Cc:     shawnguo@...nel.org, festevam@...il.com, linux-imx@....com,
        linux-fbdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        Lv Ruyi <lv.ruyi@....com.cn>, Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] video: fbdev: Fix missing of_node_put in imxfb_probe

On 4/7/22 11:01, cgel.zte@...il.com wrote:
> From: Lv Ruyi <lv.ruyi@....com.cn>
>
> of_parse_phandle returns node pointer with refcount incremented,
> use of_node_put() on it when done.
>
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Lv Ruyi <lv.ruyi@....com.cn>

applied.
Thanks!
Helge

> ---
>  drivers/video/fbdev/imxfb.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
> index 68288756ffff..a2f644c97f28 100644
> --- a/drivers/video/fbdev/imxfb.c
> +++ b/drivers/video/fbdev/imxfb.c
> @@ -925,10 +925,12 @@ static int imxfb_probe(struct platform_device *pdev)
>  				sizeof(struct imx_fb_videomode), GFP_KERNEL);
>  		if (!fbi->mode) {
>  			ret = -ENOMEM;
> +			of_node_put(display_np);
>  			goto failed_of_parse;
>  		}
>
>  		ret = imxfb_of_read_mode(&pdev->dev, display_np, fbi->mode);
> +		of_node_put(display_np);
>  		if (ret)
>  			goto failed_of_parse;
>  	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ