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] [thread-next>] [day] [month] [year] [list]
Message-ID: <5B8DA87D05A7694D9FA63FD143655C1B74A82576@hasmsx108.ger.corp.intel.com>
Date:   Wed, 20 Dec 2017 08:58:50 +0000
From:   "Winkler, Tomas" <tomas.winkler@...el.com>
To:     Colin King <colin.king@...onical.com>,
        Arnd Bergmann <arnd@...db.de>,
        "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>
CC:     "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] mei: fix incorrect logical operator in if statement


> From: Colin Ian King <colin.king@...onical.com>
> 
> The current expression using the || operator is always true because
> dev->dev_state cannot be equal to two different values at the same time.
> Fix this by replacing the || with &&.
> 
> Detected by CoverityScan, CID#1463042 ("Constant expression result")
> 
> Fixes: 8d52af6795c0 ("mei: speed up the power down flow")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
Shame on me.
Ack.
Tomas

> ---
>  drivers/misc/mei/hw-me.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c index
> 0b21f9ec00f5..334ab02e1de2 100644
> --- a/drivers/misc/mei/hw-me.c
> +++ b/drivers/misc/mei/hw-me.c
> @@ -1261,7 +1261,7 @@ irqreturn_t mei_me_irq_thread_handler(int irq,
> void *dev_id)
>  			break;
> 
>  		if (rets &&
> -		    (dev->dev_state != MEI_DEV_RESETTING ||
> +		    (dev->dev_state != MEI_DEV_RESETTING &&
>  		     dev->dev_state != MEI_DEV_POWER_DOWN)) {
>  			dev_err(dev->dev, "mei_irq_read_handler ret =
> %d.\n",
>  						rets);
> --
> 2.14.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ