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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 7 Sep 2018 14:39:12 -0400
From:   Dennis Zhou <dennisszhou@...il.com>
To:     Igor Stoppa <igor.stoppa@...il.com>
Cc:     Tejun Heo <tj@...nel.org>, Christoph Lameter <cl@...ux.com>,
        Igor Stoppa <igor.stoppa@...wei.com>,
        zijun_hu <zijun_hu@....com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [RESEND PATCH] mm: percpu: remove unnecessary unlikely()

Hi Igor,

On Fri, Sep 07, 2018 at 09:10:35PM +0300, Igor Stoppa wrote:
> WARN_ON() already contains an unlikely(), so it's not necessary to
> wrap it into another.
> 
> Signed-off-by: Igor Stoppa <igor.stoppa@...wei.com>
> Acked-by: Dennis Zhou <dennisszhou@...il.com>
> Cc: Tejun Heo <tj@...nel.org>
> Cc: zijun_hu <zijun_hu@....com>
> Cc: Christoph Lameter <cl@...ux.com>
> Cc: linux-mm@...ck.org
> Cc: linux-kernel@...r.kernel.org
> ---
>  mm/percpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/percpu.c b/mm/percpu.c
> index a749d4d96e3e..f5c2796fe63e 100644
> --- a/mm/percpu.c
> +++ b/mm/percpu.c
> @@ -2588,7 +2588,7 @@ int __init pcpu_page_first_chunk(size_t reserved_size,
>  	BUG_ON(ai->nr_groups != 1);
>  	upa = ai->alloc_size/ai->unit_size;
>  	nr_g0_units = roundup(num_possible_cpus(), upa);
> -	if (unlikely(WARN_ON(ai->groups[0].nr_units != nr_g0_units))) {
> +	if (WARN_ON(ai->groups[0].nr_units != nr_g0_units)) {
>  		pcpu_free_alloc_info(ai);
>  		return -EINVAL;
>  	}
> -- 
> 2.17.1
> 

Sorry for the delay. I'll be taking over the percpu tree and am in the
process of getting a tree. I'm still keeping track of this and will take
it for the next release.

Thanks,
Dennis

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ