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: <e969f1b4-bc9c-03dc-5e26-8b514ac90edf@redhat.com>
Date:   Fri, 20 Nov 2020 10:28:52 +0100
From:   David Hildenbrand <david@...hat.com>
To:     Oscar Salvador <osalvador@...e.de>, akpm@...ux-foundation.org
Cc:     mike.kravetz@...cle.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm,hugetlb: Remove unneded initialization

On 19.11.20 12:21, Oscar Salvador wrote:
> hugetlb_add_hstate initializes nr_huge_pages and free_huge_pages to 0,
> but since hstates[] is a global variable, all its fields are defined to
> 0 already.
> 
> Signed-off-by: Oscar Salvador <osalvador@...e.de>
> ---
>   mm/hugetlb.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index 37f15c3c24dc..1c69e9044887 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -3197,8 +3197,6 @@ void __init hugetlb_add_hstate(unsigned int order)
>   	h = &hstates[hugetlb_max_hstate++];
>   	h->order = order;
>   	h->mask = ~((1ULL << (order + PAGE_SHIFT)) - 1);
> -	h->nr_huge_pages = 0;
> -	h->free_huge_pages = 0;
>   	for (i = 0; i < MAX_NUMNODES; ++i)
>   		INIT_LIST_HEAD(&h->hugepage_freelists[i]);
>   	INIT_LIST_HEAD(&h->hugepage_activelist);
> 

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

-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ