From: Wu Fengguang Date: Wed, 16 Dec 2009 11:19:57 +0000 (+0100) Subject: HWPOISON: avoid grabbing the page count multiple times during madvise injection X-Git-Tag: v2.6.33-rc1~45^2~28 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd1ce5f91f545730df4af492f774d9d32f5da3cb;p=pandora-kernel.git HWPOISON: avoid grabbing the page count multiple times during madvise injection If page is double referenced in madvise_hwpoison() and __memory_failure(), remove_mapping() will fail because it expects page_count=2. Fix it by not grabbing extra page count in __memory_failure(). Signed-off-by: Wu Fengguang Signed-off-by: Andi Kleen --- diff --git a/mm/madvise.c b/mm/madvise.c index 35b1479b7c9d..18970aec0d2f 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -238,7 +238,6 @@ static int madvise_hwpoison(unsigned long start, unsigned long end) page_to_pfn(p), start); /* Ignore return value for now */ __memory_failure(page_to_pfn(p), 0, 1); - put_page(p); } return ret; } Reading git-diff-tree failed