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: <58E485A1.80208@huawei.com>
Date:   Wed, 5 Apr 2017 13:50:25 +0800
From:   Zefan Li <lizefan@...wei.com>
To:     Nicholas Mc Guire <der.herr@...r.at>, Tejun Heo <tj@...nel.org>
CC:     Andrew Morton <akpm@...ux-foundation.org>,
        Michal Hocko <mhocko@...e.com>,
        Vlastimil Babka <vbabka@...e.cz>,
        Ingo Molnar <mingo@...nel.org>,
        "Joonwoo Park" <joonwoop@...eaurora.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] cgroup: switch to BUG_ON()

On 2017/3/27 0:24, Nicholas Mc Guire wrote:
> Use BUG_ON() rather than an explicit if followed by BUG() for 
> improved readability and also consistency.
> 
> Signed-off-by: Nicholas Mc Guire <der.herr@...r.at>
> ---
> 
> Found by coccinelle: bugon.cocci
> ./kernel/cgroup/cpuset.c:2125:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG.
> ./kernel/cgroup/cpuset.c:2127:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG.
> ./kernel/cgroup/cpuset.c:2143:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG.
> 
> BUG_ON() wraps the explicit if condition and is actually in use for
> all conditional BUG() cases in cpuset.c except in this one function.
> 
> Patch was compile-tested with: x86_64_defconfig (implies CONFIG_CPUSETS=y)
> (checkpatch warnings for this patch seem to be false-positives - the 
>  BUG_ON should be fine)
> 
> Patch is against 4.11-rc3 (localversion-next is next-20170324)
> 

Acked-by: Zefan Li <lizefan@...wei.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ