Re: [patch 2/2] mm: remove task assumptions from swap token

Rik van Riel
2009-06-16T21:57:09Z

Johannes Weiner wrote:
> From: Hugh Dickins <hugh.dickins@tiscali.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@tiscali.co.uk>
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>

Reviewed-by: Rik van Riel <riel@redhat.com>

--
All rights reversed.