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: <20220412100051.g2mx734l3ogz4tcw@mercury.elektranox.org>
Date:   Tue, 12 Apr 2022 12:00:51 +0200
From:   Sebastian Reichel <sebastian.reichel@...labora.com>
To:     Miaoqian Lin <linmq006@...il.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] HSI: omap_ssi: Fix refcount leak in ssi_probe

Hi,

On Mon, Apr 04, 2022 at 08:52:32AM +0000, Miaoqian Lin wrote:
> When returning or breaking early from a
> for_each_available_child_of_node() loop, we need to explicitly call
> of_node_put() on the child node to possibly release the node.
> 
> Fixes: b209e047bc74 ("HSI: Introduce OMAP SSI driver")
> Signed-off-by: Miaoqian Lin <linmq006@...il.com>
> ---

Thanks, queued.

-- Sebastian

>  drivers/hsi/controllers/omap_ssi_core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/hsi/controllers/omap_ssi_core.c b/drivers/hsi/controllers/omap_ssi_core.c
> index 44a3f5660c10..eb9820158318 100644
> --- a/drivers/hsi/controllers/omap_ssi_core.c
> +++ b/drivers/hsi/controllers/omap_ssi_core.c
> @@ -524,6 +524,7 @@ static int ssi_probe(struct platform_device *pd)
>  		if (!childpdev) {
>  			err = -ENODEV;
>  			dev_err(&pd->dev, "failed to create ssi controller port\n");
> +			of_node_put(child);
>  			goto out3;
>  		}
>  	}
> -- 
> 2.17.1
> 

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ