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]
Message-ID: <YJUj7glesit6HnF6@casper.infradead.org>
Date:   Fri, 7 May 2021 12:26:38 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Cc:     mcgrof@...nel.org, keescook@...omium.org, yzaikin@...gle.com,
        ast@...nel.org, daniel@...earbox.net, andrii@...nel.org,
        kafai@...com, songliubraving@...com, yhs@...com,
        john.fastabend@...il.com, kpsingh@...nel.org,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        netdev@...r.kernel.org, bpf@...r.kernel.org
Subject: Re: [PATCH] sysctl: Remove redundant assignment to first

On Fri, May 07, 2021 at 06:15:54PM +0800, Jiapeng Chong wrote:
> Variable first is set to '0', but this value is never read as it is
> not used later on, hence it is a redundant assignment and can be
> removed.
> 
> Clean up the following clang-analyzer warning:
> 
> kernel/sysctl.c:1562:4: warning: Value stored to 'first' is never read
> [clang-analyzer-deadcode.DeadStores].

While this is true, it is incomplete.  The 'first' declaration should be
moved into the 'else' arm of the 'if (write)' conditional.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ