From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Fengguang Subject: [PATCH 02/24] migrate: page could be locked by hwpoison, dont BUG() Date: Wed, 02 Dec 2009 11:12:33 +0800 Message-ID: <20091202043043.840044332@intel.com> References: <20091202031231.735876003@intel.com> Return-path: Received: from mail138.messagelabs.com (mail138.messagelabs.com [216.82.249.35]) by kanga.kvack.org (Postfix) with SMTP id 22EC36007A5 for ; Tue, 1 Dec 2009 23:37:37 -0500 (EST) Content-Disposition: inline; filename=hwpoison-migrate-trylock-fix.patch Sender: owner-linux-mm@kvack.org To: Andi Kleen Cc: Andrew Morton , Nick Piggin , Christoph Lameter , KAMEZAWA Hiroyuki , Wu Fengguang , linux-mm@kvack.org, LKML List-Id: linux-mm.kvack.org The new page could be taken by hwpoison, in which case return EAGAIN to allocate a new page and retry. CC: Nick Piggin CC: Christoph Lameter CC: KAMEZAWA Hiroyuki Signed-off-by: Wu Fengguang --- mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-mm.orig/mm/migrate.c 2009-11-02 10:18:45.000000000 +0800 +++ linux-mm/mm/migrate.c 2009-11-02 10:26:16.000000000 +0800 @@ -556,7 +556,7 @@ static int move_to_new_page(struct page * holding a reference to the new page at this point. */ if (!trylock_page(newpage)) - BUG(); + return -EAGAIN; /* got by hwpoison */ /* Prepare mapping for the new page.*/ newpage->index = page->index; -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org