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:	Fri, 09 Jan 2015 16:58:41 +0100
From:	Michal Nazarewicz <mina86@...a86.com>
To:	"George G. Davis" <ggdavisiv@...il.com>,
	linux-kernel@...r.kernel.org
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Joonsoo Kim <iamjoonsoo.kim@....com>,
	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
	Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
	"George G. Davis" <george_davis@...tor.com>
Subject: Re: [PATCH] mm: cma: Fix totalcma_pages to include DT defined CMA regions

On Fri, Jan 09 2015, "George G. Davis" <ggdavisiv@...il.com> wrote:
> The totalcma_pages variable is not updated to account for CMA regions
> defined via device tree reserved-memory sub-nodes.  Fix this omission by
> moving the calculation of totalcma_pages into cma_init_reserved_mem()
> instead of cma_declare_contiguous() such that it will include reserved
> memory used by all CMA regions.
>
> Signed-off-by: George G. Davis <george_davis@...tor.com>

Acked-by: Michal Nazarewicz <mina86@...a86.com>

> ---
>  mm/cma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/cma.c b/mm/cma.c
> index a85ae28..75016fd 100644
> --- a/mm/cma.c
> +++ b/mm/cma.c
> @@ -199,6 +199,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);
>  
>  	return 0;
>  }
> @@ -337,7 +338,6 @@ int __init cma_declare_contiguous(phys_addr_t base,
>  	if (ret)
>  		goto err;
>  
> -	totalcma_pages += (size / PAGE_SIZE);
>  	pr_info("Reserved %ld MiB at %pa\n", (unsigned long)size / SZ_1M,
>  		&base);
>  	return 0;
> -- 
> 1.9.3
>

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +--<mpn@...gle.com>--<xmpp:mina86@...ber.org>--ooO--(_)--Ooo--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ