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  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:   Fri, 22 Mar 2019 20:44:51 +0100
From:   Enric Balletbo i Serra <enric.balletbo@...labora.com>
To:     egranata@...omium.org, lee.jones@...aro.org, bleung@...omium.org,
        groeck@...omium.org, linux-kernel@...r.kernel.org
Cc:     gwendal@...gle.com, amstan@...gle.com
Subject: Re: [PATCH] mfd: cros_ec: Only register a positive IRQ number

Hi Enrico,

On 21/3/19 22:03, egranata@...omium.org wrote:
> From: Enrico Granata <egranata@...omium.org>
> 
> Add a layer of sanity checking to cros_ec_register against attempting to
> register IRQ values that are not strictly greater than 0.
> 
> Signed-off-by: Enrico Granata <egranata@...omium.org>
> ---
>  drivers/mfd/cros_ec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mfd/cros_ec.c b/drivers/mfd/cros_ec.c
> index 6acfe036d5222..ff8984a2b8c21 100644
> --- a/drivers/mfd/cros_ec.c
> +++ b/drivers/mfd/cros_ec.c
> @@ -118,7 +118,7 @@ int cros_ec_register(struct cros_ec_device *ec_dev)
>  		return err;
>  	}
>  
> -	if (ec_dev->irq) {
> +	if (ec_dev->irq > 0) {
>  		err = devm_request_threaded_irq(dev, ec_dev->irq, NULL,
>  				ec_irq_thread, IRQF_TRIGGER_LOW | IRQF_ONESHOT,
>  				"chromeos-ec", ec_dev);
> 

Acked-by: Enric Balletbo i Serra <enric.balletbo@...labora.com>

Thanks,
 Enric

Powered by blists - more mailing lists