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, 14 Jul 2022 22:09:23 -0700
From:   Dipen Patel <dipenp@...dia.com>
To:     Kent Gibson <warthog618@...il.com>, linux-kernel@...r.kernel.org,
        linux-gpio@...r.kernel.org, brgl@...ev.pl,
        linus.walleij@...aro.org, andy.shevchenko@...il.com
Subject: Re: [PATCH v2 1/6] gpiolib: cdev: simplify linereq_free

On 7/13/22 7:03 PM, Kent Gibson wrote:
> The edge detector is only ever started after the line desc has been
> determined, so move edge_detector_stop() inside the line desc check,
> and merge the two checked regions into one.
>
> Signed-off-by: Kent Gibson <warthog618@...il.com>
> Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
> ---
>  drivers/gpio/gpiolib-cdev.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
> index 0c9a63becfef..b44526e3630e 100644
> --- a/drivers/gpio/gpiolib-cdev.c
> +++ b/drivers/gpio/gpiolib-cdev.c
> @@ -1460,15 +1460,15 @@ static ssize_t linereq_read(struct file *file,
>  static void linereq_free(struct linereq *lr)
>  {
>  	unsigned int i;
> -	bool hte = false;
> +	bool hte;
>  
>  	for (i = 0; i < lr->num_lines; i++) {
> -		if (lr->lines[i].desc)
> +		if (lr->lines[i].desc) {
>  			hte = !!test_bit(FLAG_EVENT_CLOCK_HTE,
>  					 &lr->lines[i].desc->flags);
> -		edge_detector_stop(&lr->lines[i], hte);
> -		if (lr->lines[i].desc)
> +			edge_detector_stop(&lr->lines[i], hte);
>  			gpiod_free(lr->lines[i].desc);
> +		}
>  	}
>  	kfifo_free(&lr->events);
>  	kfree(lr->label);

Acked-by: Dipen Patel <dipenp@...dia.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ