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: <YiiOj3n3ocUr+/68@kroah.com>
Date:   Wed, 9 Mar 2022 12:25:03 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Miaoqian Lin <linmq006@...il.com>
Cc:     Bin Liu <b-liu@...com>, Roger Quadros <rogerq@...com>,
        linux-usb@...r.kernel.org, linux-omap@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: musb: Fix missing of_node_put() in omap2430_probe

On Wed, Mar 09, 2022 at 11:10:33AM +0000, Miaoqian Lin wrote:
> The device_node pointer is returned by of_parse_phandle() with refcount
> incremented. We should use of_node_put() on it when done.
> 
> Fixes: 8934d3e4d0e7 ("usb: musb: omap2430: Don't use omap_get_control_dev()")
> Signed-off-by: Miaoqian Lin <linmq006@...il.com>
> ---
>  drivers/usb/musb/omap2430.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> index 7d4d0713f4f0..4a963cfa385b 100644
> --- a/drivers/usb/musb/omap2430.c
> +++ b/drivers/usb/musb/omap2430.c
> @@ -363,6 +363,7 @@ static int omap2430_probe(struct platform_device *pdev)
>  	control_node = of_parse_phandle(np, "ctrl-module", 0);
>  	if (control_node) {
>  		control_pdev = of_find_device_by_node(control_node);
> +		of_node_put(control_node);
>  		if (!control_pdev) {
>  			dev_err(&pdev->dev, "Failed to get control device\n");
>  			ret = -EINVAL;
> -- 
> 2.17.1
> 

How was this tested?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ