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]
Date:	Fri, 29 Jun 2012 11:32:33 -0700
From:	Tejun Heo <tj@...nel.org>
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
	Sasha Levin <levinsasha928@...il.com>,
	Gavin Shan <shangw@...ux.vnet.ibm.com>,
	linux-mm <linux-mm@...ck.org>, linux-kernel@...r.kernel.org,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>
Subject: Re: [PATCH for -3.5] memblock: free allocated
 memblock_reserved_regions later

Hello, Yinghai.

Just one nitpick.

On Fri, Jun 29, 2012 at 11:27:57AM -0700, Yinghai Lu wrote:
>  /**
>   * memblock_double_array - double the size of the memblock regions array
>   * @type: memblock type of the regions array being doubled
> @@ -204,6 +192,7 @@ static int __init_memblock memblock_doub
>  						phys_addr_t new_area_size)
>  {
>  	struct memblock_region *new_array, *old_array;
> +	phys_addr_t old_alloc_size, new_alloc_size;
>  	phys_addr_t old_size, new_size, addr;
>  	int use_slab = slab_is_available();
>  	int *in_slab;
> @@ -217,6 +206,12 @@ static int __init_memblock memblock_doub
>  	/* Calculate new doubled size */
>  	old_size = type->max * sizeof(struct memblock_region);
>  	new_size = old_size << 1;
> +	/*
> +	 * We need to allocated new one align to PAGE_SIZE,
> +	 *  so late could free them completely.

An extra space and probably "so we can free them completely later"
fits better.

Thank you!

-- 
tejun
--
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