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]
Date: Tue, 18 Jun 2024 09:37:26 +0200
From: David Hildenbrand <david@...hat.com>
To: Hongfu Li <lihongfu@...inos.cn>, akpm@...ux-foundation.org
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] khugepaged: Simplify the allocation of slab caches

On 18.06.24 03:45, Hongfu Li wrote:
> Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
> to simplify the creation of SLAB caches.
> 
> Signed-off-by: Hongfu Li <lihongfu@...inos.cn>
> ---
>   mm/khugepaged.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/mm/khugepaged.c b/mm/khugepaged.c
> index 774a97e6e2da..f8d08b49420c 100644
> --- a/mm/khugepaged.c
> +++ b/mm/khugepaged.c
> @@ -385,10 +385,7 @@ int hugepage_madvise(struct vm_area_struct *vma,
>   
>   int __init khugepaged_init(void)
>   {
> -	mm_slot_cache = kmem_cache_create("khugepaged_mm_slot",
> -					  sizeof(struct khugepaged_mm_slot),
> -					  __alignof__(struct khugepaged_mm_slot),
> -					  0, NULL);
> +	mm_slot_cache = KMEM_CACHE(khugepaged_mm_slot, 0);
>   	if (!mm_slot_cache)
>   		return -ENOMEM;
>   

Acked-by: David Hildenbrand <david@...hat.com>

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ