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:   Wed, 24 Jan 2018 16:28:31 -0500 (EST)
From:   David Miller <davem@...emloft.net>
To:     niklas.cassel@...s.com
Cc:     peppe.cavallaro@...com, alexandre.torgue@...com, niklass@...s.com,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] net: stmmac: do not use a bitwise AND
 operator with a bool operand

From: Niklas Cassel <niklas.cassel@...s.com>
Date: Mon, 22 Jan 2018 16:59:50 +0100

> Doing a bitwise AND between a bool and an int is generally not a good idea.
> The bool will be promoted to an int with value 0 or 1,
> the int is generally regarded as true with a non-zero value,
> thus ANDing them has the potential to yield an undesired result.
> 
> This commit fixes the following smatch warnings:
> 
> drivers/net/ethernet/stmicro/stmmac/enh_desc.c:344 enh_desc_prepare_tx_desc() warn: maybe use && instead of &
> drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c:337 dwmac4_rd_prepare_tx_desc() warn: maybe use && instead of &
> drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c:380 dwmac4_rd_prepare_tso_tx_desc() warn: maybe use && instead of &
> 
> Signed-off-by: Niklas Cassel <niklas.cassel@...s.com>

Applied.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ