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]
Date:   Sat, 26 Sep 2020 01:17:55 +0200
From:   Marek Behun <marek.behun@....cz>
To:     Tobias Jordan <kernel@...e.de>
Cc:     linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org,
        Pavel Machek <pavel@....cz>, Dan Murphy <dmurphy@...com>,
        Jean-Jacques Hiblot <jjhiblot@...com>,
        Tomi Valkeinen <tomi.valkeinen@...com>
Subject: Re: [PATCH] leds: tlc591xx: fix leak of device node iterator

On Sat, 26 Sep 2020 01:10:11 +0200
Tobias Jordan <kernel@...e.de> wrote:

> In one of the error paths of the for_each_child_of_node loop in
> tlc591xx_probe, add missing call to of_node_put.
> 
> Fixes: 1ab4531ad132 ("leds: tlc591xx: simplify driver by using the
> managed led API")
> 
> Signed-off-by: Tobias Jordan <kernel@...e.de>
> ---
>  drivers/leds/leds-tlc591xx.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/leds/leds-tlc591xx.c b/drivers/leds/leds-tlc591xx.c
> index 0929f1275814..a8cc49752cd5 100644
> --- a/drivers/leds/leds-tlc591xx.c
> +++ b/drivers/leds/leds-tlc591xx.c
> @@ -214,6 +214,7 @@ tlc591xx_probe(struct i2c_client *client,
>  		err = devm_led_classdev_register_ext(dev, &led->ldev,
>  						     &init_data);
>  		if (err < 0) {
> +			of_node_put(child);
>  			if (err != -EPROBE_DEFER)
>  				dev_err(dev, "couldn't register LED %s\n",
>  					led->ldev.name);

This won't apply on pavel's for-next tree, there is no check for
EPROBE_DEFER, see
https://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git/tree/drivers/leds/leds-tlc591xx.c?h=for-next

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ