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]
Message-ID: <47CE5155.5000009@linux.vnet.ibm.com>
Date:	Wed, 05 Mar 2008 13:22:53 +0530
From:	Kamalesh Babulal <kamalesh@...ux.vnet.ibm.com>
To:	Adam Litke <agl@...ibm.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, linuxppc-dev@...abs.org,
	apw@...dowen.org, balbir@...ux.vnet.ibm.com
Subject: Re: [BUG] 2.6.25-rc3-mm1 kernel bug while running libhugetlbfs

Adam Litke wrote:
> On Tue, 2008-03-04 at 11:51 -0800, Andrew Morton wrote:
>> hugetlb-correct-page-count-for-surplus-huge-pages.patch adds:
>>
>>         if (page) {
>>                 /*
>>                  * This page is now managed by the hugetlb allocator and has
>>                  * no users -- drop the buddy allocator's reference.
>>                  */
>>                 int page_count = put_page_testzero(page);
>>                 BUG_ON(page_count != 0);
>>
>>
> 
> Ugh I got bitten by put_page_testzero().  When it returns 1, the page
> count is zero (not the page count).
> 
> My initial version had a BUG_ON() with side-effects.  When a reviewer
> pointed it out, I thought I could fix the patch up on its way out the
> door.  I have self-administered my punishment.  This patch will fix it:
Hi Adam,

Thanks the patch fixes the kernel bug while running the libhugetlbfs test.

Tested-by: Kamalesh Babulal <kamalesh@...ux.vnet.ibm.com>

> 
> Signed-off-by: Adam Litke <agl@...ibm.com>
> 
> --- mm/hugetlb.c.orig	2008-03-04 13:36:30.000000000 -0800
> +++ mm/hugetlb.c	2008-03-04 13:39:30.000000000 -0800
> @@ -291,8 +291,8 @@ static struct page *alloc_buddy_huge_pag
>  		 * This page is now managed by the hugetlb allocator and has
>  		 * no users -- drop the buddy allocator's reference.
>  		 */
> -		int page_count = put_page_testzero(page);
> -		BUG_ON(page_count != 0);
> +		put_page_testzero(page);
> +		VM_BUG_ON(page_count(page));
>  		nid = page_to_nid(page);
>  		set_compound_page_dtor(page, free_huge_page);
>  		/*
> 


-- 
Thanks & Regards,
Kamalesh Babulal,
Linux Technology Center,
IBM, ISTL.
--
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