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: <d7d1af6f-3a98-4c9a-bb39-c8f98b41a2e8@suse.cz>
Date: Tue, 23 Jan 2024 09:47:06 +0100
From: Vlastimil Babka <vbabka@...e.cz>
To: Chengming Zhou <zhouchengming@...edance.com>,
 Hyeonggon Yoo <42.hyeyoo@...il.com>, Joonsoo Kim <iamjoonsoo.kim@....com>,
 Christoph Lameter <cl@...ux.com>, Pekka Enberg <penberg@...nel.org>,
 Andrew Morton <akpm@...ux-foundation.org>,
 Roman Gushchin <roman.gushchin@...ux.dev>,
 David Rientjes <rientjes@...gle.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] mm/slub: remove unused parameter in
 next_freelist_entry()

On 1/17/24 12:46, Chengming Zhou wrote:
> The parameter "struct slab *slab" is unused in next_freelist_entry(),
> so just remove it.
> 
> Signed-off-by: Chengming Zhou <zhouchengming@...edance.com>

Reviewed-by: Vlastimil Babka <vbabka@...e.cz>

> ---
>  mm/slub.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/mm/slub.c b/mm/slub.c
> index f0307e8b4cd2..3a4e2f8d341c 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -2243,7 +2243,7 @@ static void __init init_freelist_randomization(void)
>  }
>  
>  /* Get the next entry on the pre-computed freelist randomized */
> -static void *next_freelist_entry(struct kmem_cache *s, struct slab *slab,
> +static void *next_freelist_entry(struct kmem_cache *s,
>  				unsigned long *pos, void *start,
>  				unsigned long page_limit,
>  				unsigned long freelist_count)
> @@ -2282,13 +2282,12 @@ static bool shuffle_freelist(struct kmem_cache *s, struct slab *slab)
>  	start = fixup_red_left(s, slab_address(slab));
>  
>  	/* First entry is used as the base of the freelist */
> -	cur = next_freelist_entry(s, slab, &pos, start, page_limit,
> -				freelist_count);
> +	cur = next_freelist_entry(s, &pos, start, page_limit, freelist_count);
>  	cur = setup_object(s, cur);
>  	slab->freelist = cur;
>  
>  	for (idx = 1; idx < slab->objects; idx++) {
> -		next = next_freelist_entry(s, slab, &pos, start, page_limit,
> +		next = next_freelist_entry(s, &pos, start, page_limit,
>  			freelist_count);
>  		next = setup_object(s, next);
>  		set_freepointer(s, cur, next);
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ