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: <cf840d88-389f-4846-9099-798a47c11e5b@redhat.com>
Date: Thu, 1 Aug 2024 11:28:44 +0200
From: David Hildenbrand <david@...hat.com>
To: Hao Ge <hao.ge@...ux.dev>, akpm@...ux-foundation.org
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
 Hao Ge <gehao@...inos.cn>
Subject: Re: [PATCH] mm/cma: Change the addition of totalcma_pages in the
 cma_init_reserved_mem

On 29.07.24 10:04, Hao Ge wrote:
> From: Hao Ge <gehao@...inos.cn>
> 
> Replace the unnecessary division calculation with cma->count
> when update the value of totalcma_pages.
> 
> Signed-off-by: Hao Ge <gehao@...inos.cn>
> ---
>   mm/cma.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/cma.c b/mm/cma.c
> index 3e9724716bad..95d6950e177b 100644
> --- a/mm/cma.c
> +++ b/mm/cma.c
> @@ -202,7 +202,7 @@ int __init cma_init_reserved_mem(phys_addr_t base, phys_addr_t size,
>   	cma->order_per_bit = order_per_bit;
>   	*res_cma = cma;
>   	cma_area_count++;
> -	totalcma_pages += (size / PAGE_SIZE);
> +	totalcma_pages += cma->count;
>   
>   	return 0;
>   }

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

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ