[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090617110034.db01479b.minchan.kim@barrios-desktop>
Date: Wed, 17 Jun 2009 11:00:34 +0900
From: Minchan Kim <minchan.kim@...il.com>
To: Johannes Weiner <hannes@...xchg.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Hugh Dickins <hugh.dickins@...cali.co.uk>,
Andrea Arcangeli <aarcange@...hat.com>,
Izik Eidus <ieidus@...hat.com>, Rik van Riel <riel@...hat.com>,
Nick Piggin <nickpiggin@...oo.com.au>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [patch 2/2] mm: remove task assumptions from swap token
Hi, Hannes.
How about adding Hugh's comment ?
I think that is more straightforward and easy.
And it explained even real example like KSM.
So I suggest following as..
==
grab_swap_token() should not make any assumptions about the running
process as the swap token is an attribute of the address space and the
faulting mm is not necessarily current->mm.
If a kthread happens to use get_user_pages() on an mm (as KSM does),
there's a chance that it will end up trying to read in a swap page,
then oops in grab_swap_token() because the kthread has no mm: GUP
passes down the right mm, so grab_swap_token() ought to be using it.
==
Anyway, It looks good to me.
It might be just nitpick :)
If you feel it, ignore me.
Anyway I am OK.
On Tue, 16 Jun 2009 23:50:37 +0200
Johannes Weiner <hannes@...xchg.org> wrote:
> From: Hugh Dickins <hugh.dickins@...cali.co.uk>
>
> grab_swap_token() should not make any assumptions about the running
> process as the swap token is an attribute of the address space and the
> faulting mm is not necessarily current->mm.
>
> This fixes get_user_pages() from kernel threads which would blow up
> when encountering a swapped out page and grab_swap_token()
> dereferencing the unset for kernel threads current->mm.
>
> Signed-off-by: Hugh Dickins <hugh.dickins@...cali.co.uk>
> Signed-off-by: Johannes Weiner <hannes@...xchg.org>
Reviewed-by: Minchan Kim <minchan.kim@...il.com>
--
Kinds Regards
Minchan Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists