Re: [PATCH 1/2] Check PageUnevictable in lru_deactivate_fn

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 2, 2011 at 7:10 AM, Ying Han <yinghan@xxxxxxxxxx> wrote:
> On Sun, May 1, 2011 at 8:03 AM, Minchan Kim <minchan.kim@xxxxxxxxx> 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 <yinghan@xxxxxxxxxx>
>> Tested-by: Ying Han <yinghan@xxxxxxxxxx>
>> Signed-off-by: Minchan Kim <minchan.kim@xxxxxxxxx>
>> ---
>> Â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.

Thanks for the help, Ying.

-- 
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  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: <a href


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]