From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail144.messagelabs.com (mail144.messagelabs.com [216.82.254.51]) by kanga.kvack.org (Postfix) with ESMTP id CD5DA900001 for ; Sun, 1 May 2011 11:03:56 -0400 (EDT) Received: by pvc12 with SMTP id 12so3861592pvc.14 for ; Sun, 01 May 2011 08:03:55 -0700 (PDT) From: Minchan Kim Subject: [PATCH 1/2] Check PageUnevictable in lru_deactivate_fn Date: Mon, 2 May 2011 00:03:30 +0900 Message-Id: In-Reply-To: References: In-Reply-To: References: Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: linux-mm , LKML , KAMEZAWA Hiroyuki , Johannes Weiner , Rik van Riel , KOSAKI Motohiro , Mel Gorman , Ying Han , Minchan Kim The lru_deactivate_fn should not move page which in on unevictable lru into inactive list. Otherwise, we can meet BUG when we use isolate_lru_pages as __isolate_lru_page could return -EINVAL. It's really BUG and let's fix it. Reported-by: Ying Han Tested-by: Ying Han Signed-off-by: Minchan Kim --- mm/swap.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/mm/swap.c b/mm/swap.c index a83ec5a..2e9656d 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -429,6 +429,9 @@ static void lru_deactivate_fn(struct page *page, void *arg) if (!PageLRU(page)) return; + if (PageUnevictable(page)) + return; + /* Some processes are using the page */ if (page_mapped(page)) return; -- 1.7.1 -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org