mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Minchan Kim <minchan.kim@gmail.com>
To: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Izik Eidus <ieidus@redhat.com>, Rik van Riel <riel@redhat.com>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Minchan Kim <minchan.kim@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: pass mm to grab_swap_token
Date: Mon, 22 Jun 2009 09:32:47 +0900	[thread overview]
Message-ID: <20090622093247.bc4f4c0f.minchan.kim@barrios-desktop> (raw)
In-Reply-To: <Pine.LNX.4.64.0906211326520.6124@sister.anvils>

On Sun, 21 Jun 2009 14:02:43 +0100 (BST)
Hugh Dickins <hugh.dickins@tiscali.co.uk> wrote:

> 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.
> 
> We have not identified a stronger case than KSM's daemon (not yet
> in mainline), but the issue must have come up before, since RHEL has
> included a fix for this for years (though a different fix, they just
> back out of grab_swap_token if current->mm is unset: which is what
> we first proposed, but using the right mm here seems more correct).
> 
> Reported-by: Izik Eidus <ieidus@redhat.com>
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
> Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
> Acked-by: Rik van Riel <riel@redhat.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>

I already added my sign to Hannes but it is folded in this patch.

-- 
Kinds Regards
Minchan Kim

  reply	other threads:[~2009-06-22  0:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-16 18:05 running get_user_pages() from kernel thread Izik Eidus
2009-06-16 18:13 ` Andrea Arcangeli
2009-06-16 18:38   ` Hugh Dickins
2009-06-16 18:55     ` Rik van Riel
2009-06-16 19:45       ` Hugh Dickins
2009-06-16 20:38         ` Andrea Arcangeli
2009-06-16 21:02           ` Hugh Dickins
2009-06-16 21:19         ` Rik van Riel
2009-06-16 19:20     ` Izik Eidus
2009-06-16 20:45       ` Hugh Dickins
2009-06-16 21:25         ` Izik Eidus
2009-06-16 20:08     ` Johannes Weiner
2009-06-16 20:57       ` Hugh Dickins
2009-06-16 21:50         ` [patch 1/2] mm: make swap token dummies static inlines Johannes Weiner
2009-06-16 21:55           ` Rik van Riel
2009-06-16 21:50         ` [patch 2/2] mm: remove task assumptions from swap token Johannes Weiner
2009-06-16 21:56           ` Rik van Riel
2009-06-17  2:00           ` Minchan Kim
2009-06-17  8:31             ` Johannes Weiner
2009-06-16 21:52         ` running get_user_pages() from kernel thread Johannes Weiner
2009-06-21 13:02           ` [PATCH] mm: pass mm to grab_swap_token Hugh Dickins
2009-06-22  0:32             ` Minchan Kim [this message]
2009-06-16 21:16       ` running get_user_pages() from kernel thread Rik van Riel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090622093247.bc4f4c0f.minchan.kim@barrios-desktop \
    --to=minchan.kim@gmail.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=hugh.dickins@tiscali.co.uk \
    --cc=ieidus@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=riel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®