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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 22 Nov 2018 15:16:20 +0100
From:   Daniel Lezcano <daniel.lezcano@...aro.org>
To:     Yangtao Li <tiny.windzz@...il.com>, tglx@...utronix.de
Cc:     linux-kernel@...r.kernel.org,
        Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH] clocksource/drivers/integrator-ap: add of_node_put()


Hi Yangtao,

On 20/11/2018 14:18, Yangtao Li wrote:
> use of_node_put() to release the refcount.

In future please give a better description.

No need to resend, I'll do the change.

Linus? I'm about to take this patch. Is it fine for you?

> Signed-off-by: Yangtao Li <tiny.windzz@...il.com>
> ---
>  drivers/clocksource/timer-integrator-ap.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/clocksource/timer-integrator-ap.c b/drivers/clocksource/timer-integrator-ap.c
> index 76e526f58620..50e0a9166f66 100644
> --- a/drivers/clocksource/timer-integrator-ap.c
> +++ b/drivers/clocksource/timer-integrator-ap.c
> @@ -204,8 +204,6 @@ static int __init integrator_ap_timer_init_of(struct device_node *node)
>  		return err;
>  	}
>  
> -	pri_node = of_find_node_by_path(path);
> -
>  	err = of_property_read_string(of_aliases,
>  				"arm,timer-secondary", &path);
>  	if (err) {
> @@ -213,14 +211,18 @@ static int __init integrator_ap_timer_init_of(struct device_node *node)
>  		return err;
>  	}
>  
> +	pri_node = of_find_node_by_path(path);
> +	if (node == pri_node){
> +		of_node_put(pri_node);
>  
> -	sec_node = of_find_node_by_path(path);
> -
> -	if (node == pri_node)
>  		/* The primary timer lacks IRQ, use as clocksource */
>  		return integrator_clocksource_init(rate, base);
> +	}
>  
> +	sec_node = of_find_node_by_path(path);
>  	if (node == sec_node) {
> +		of_node_put(sec_node);
> +
>  		/* The secondary timer will drive the clock event */
>  		irq = irq_of_parse_and_map(node, 0);
>  		return integrator_clockevent_init(rate, base, irq);
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ