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:	Mon, 27 Sep 2010 14:56:18 +0800
From:	Wu Fengguang <fengguang.wu@...el.com>
To:	Stephen Rothwell <sfr@...b.auug.org.au>
Cc:	Andi Kleen <andi@...stfloor.org>,
	"linux-next@...r.kernel.org" <linux-next@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Naoya Horiguchi <n-horiguchi@...jp.nec.com>
Subject: Re: linux-next: build warning after merge of the final tree
 (hwpoison tree related)

Hi Stephen,

On Mon, Sep 27, 2010 at 01:28:04PM +0800, Stephen Rothwell wrote:
> Hi Andi,
> 
> After merging the final tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
> 
> mm/hugetlb.c:2950: warning: 'is_hugepage_on_freelist' defined but not used
> 
> Introduced by commit 19b31e29073e272e49a3d38972c132c49383d5d4 ("HWPOISON,
> hugetlb: add free check to dequeue_hwpoison_huge_page()").

Maybe ppc64_defconfig does not enable CONFIG_MEMORY_FAILURE.
Try this trivial patch :)

Thanks,
Fengguang
---
hugetlb: fix is_hugepage_on_freelist() build warning

mm/hugetlb.c:2950: warning: 'is_hugepage_on_freelist' defined but not used                                                         

Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
Signed-off-by: Wu Fengguang <fengguang.wu@...el.com>
---
 mm/hugetlb.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

--- linux-next.orig/mm/hugetlb.c	2010-09-27 14:51:19.000000000 +0800
+++ linux-next/mm/hugetlb.c	2010-09-27 14:52:56.000000000 +0800
@@ -2876,8 +2876,8 @@ void hugetlb_unreserve_pages(struct inod
 	hugetlb_acct_memory(h, -(chg - freed));
 }
 
-/* Should be called in hugetlb_lock */
-static int is_hugepage_on_freelist(struct page *hpage)
+#ifdef CONFIG_MEMORY_FAILURE
+static int __is_hugepage_on_freelist(struct page *hpage)
 {
 	struct page *page;
 	struct page *tmp;
@@ -2890,7 +2890,6 @@ static int is_hugepage_on_freelist(struc
 	return 0;
 }
 
-#ifdef CONFIG_MEMORY_FAILURE
 /*
  * This function is called from memory failure code.
  * Assume the caller holds page lock of the head page.
@@ -2902,7 +2901,7 @@ int dequeue_hwpoisoned_huge_page(struct 
 	int ret = -EBUSY;
 
 	spin_lock(&hugetlb_lock);
-	if (is_hugepage_on_freelist(hpage)) {
+	if (__is_hugepage_on_freelist(hpage)) {
 		list_del(&hpage->lru);
 		h->free_huge_pages--;
 		h->free_huge_pages_node[nid]--;
--
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