[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080411081317.GQ10019@one.firstfloor.org>
Date:	Fri, 11 Apr 2008 10:13:17 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	npiggin@...e.de
Cc:	akpm@...ux-foundation.org, Andi Kleen <ak@...e.de>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org, pj@....com,
	andi@...stfloor.org, kniht@...ux.vnet.ibm.com
Subject: Re: [patch 11/17] hugetlbfs: support larger than MAX_ORDER
>  	spin_lock(&hugetlb_lock);
> -	if (h->surplus_huge_pages_node[nid]) {
> +	if (h->surplus_huge_pages_node[nid] && h->order <= MAX_ORDER) {
As Andrew Hastings pointed out earlier this all needs to be h->order < MAX_ORDER
[got pretty much all the checks wrong off by one]. It won't affect anything
on x86-64 but might cause problems on archs which have exactly MAX_ORDER
sized huge pages.
>  		update_and_free_page(h, page);
>  		h->surplus_huge_pages--;
>  		h->surplus_huge_pages_node[nid]--;
> @@ -220,6 +221,9 @@ static struct page *alloc_fresh_huge_pag
>  {
>  	struct page *page;
>  
> +	if (h->order > MAX_ORDER)
>= etc.
-Andi
--
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
 
