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]
Date:   Wed, 21 Apr 2021 04:10:19 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Yejune Deng <yejune.deng@...il.com>
Cc:     cl@...ux.com, penberg@...nel.org, rientjes@...gle.com,
        iamjoonsoo.kim@....com, akpm@...ux-foundation.org, vbabka@...e.cz,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/slab.c: use 'ac' from the caller

On Wed, Apr 21, 2021 at 10:25:17AM +0800, Yejune Deng wrote:
> @@ -3045,12 +3044,7 @@ static inline void *____cache_alloc(struct kmem_cache *cachep, gfp_t flags)
>  	}
>  
>  	STATS_INC_ALLOCMISS(cachep);
> -	objp = cache_alloc_refill(cachep, flags);
> -	/*
> -	 * the 'ac' may be updated by cache_alloc_refill(),
> -	 * and kmemleak_erase() requires its correct value.
> -	 */
> -	ac = cpu_cache_get(cachep);
> +	objp = cache_alloc_refill(cachep, ac, flags);

I think passing 'ac' in is fine (probably?  I don't know this code
deeply), but deleting this call to 'ac' is clearly wrong.  The comment
even tells you that!  I just verified the code, and the comment is
correct.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ