Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753136Ab1EAWLH (ORCPT ); Sun, 1 May 2011 18:11:07 -0400 Received: from smtp-out.google.com ([216.239.44.51]:15388 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752487Ab1EAWLD convert rfc822-to-8bit (ORCPT ); Sun, 1 May 2011 18:11:03 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=R4kcMFgFM+oUXBq1jLSZWaDDtiFsb3tjYUE4zUXNOFgd/wrRjsiVpS0uCJLOcUw1OD XIEBxyKYzGe/vz9mDb4w== MIME-Version: 1.0 In-Reply-To: References: Date: Sun, 1 May 2011 15:10:58 -0700 Message-ID: Subject: Re: [PATCH 1/2] Check PageUnevictable in lru_deactivate_fn From: Ying Han To: Minchan Kim Cc: Andrew Morton , linux-mm , LKML , KAMEZAWA Hiroyuki , Johannes Weiner , Rik van Riel , KOSAKI Motohiro , Mel Gorman Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1325 Lines: 41 On Sun, May 1, 2011 at 8:03 AM, Minchan Kim wrote: > 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 Thanks Minchan for the fix, and i haven't been able to reproducing the issue after applying the patch. --Ying > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/