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: <20181127.152539.1127313634090592618.davem@davemloft.net>
Date:   Tue, 27 Nov 2018 15:25:39 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     yuehaibing@...wei.com
Cc:     igor.russkikh@...antia.com, nikita.danilov@...antia.com,
        yana.esina@...antia.com, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net: aquantia: return 'err' if set MPI_DEINIT
 state fails

From: YueHaibing <yuehaibing@...wei.com>
Date: Sat, 24 Nov 2018 18:16:41 +0800

> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c:260:7:
>  warning: variable 'err' set but not used [-Wunused-but-set-variable]
> 
> 'err' should be returned while set MPI_DEINIT state fails
> in hw_atl_utils_soft_reset.
> 
> Fixes: cce96d1883da ("net: aquantia: Regression on reset with 1.x firmware")
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>

Applied.

But this AQ_HW_STATE_FOR macro _MUST_ be fixed.

No macro should have invisible references to variables like this, and
that is exactly what leads to bugs like this.  CPP macros written this
way make it impossible to properly audit code.

'err' should be an explicit argument given to this function instead of
how it works now.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ