linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: Andi Kleen <andi@firstfloor.org>
Cc: fengguang.wu@intel.com,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: hwpoison madvise code
Date: Tue, 8 Dec 2009 22:05:07 +1100	[thread overview]
Message-ID: <20091208110507.GF3511@nick> (raw)
In-Reply-To: <20091208120156.GZ18989@one.firstfloor.org>

On Tue, Dec 08, 2009 at 01:01:56PM +0100, Andi Kleen wrote:
> > > > Buggy: it doesn't take mmap_sem. If it followed the pattern, it
> > > > wouldn't have had this bug.
> > > 
> > > get_user_pages takes mmap_sem if needed.
> > 
> > On the contrary it is clearly documented as requiring mmap_sem.
> 
> True, I forgot about that. I think at some point I had gup_fast
> in there, I'll just switch back to that. Thanks for the kind note.

My pleasure :) 

> BTW looking over the tree I find at least one other caller that doesn't
> hold it, like futex.c:fault_in_user_writeable. I'll send a separate
> patch for t hat.

Nasty. Good catch.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2009-12-08 12:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-08 11:24 Nick Piggin
2009-12-08 11:26 ` Andi Kleen
2009-12-08 10:48   ` Nick Piggin
2009-12-08 12:01     ` Andi Kleen
2009-12-08 11:05       ` Nick Piggin [this message]

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=20091208110507.GF3511@nick \
    --to=npiggin@suse.de \
    --cc=andi@firstfloor.org \
    --cc=fengguang.wu@intel.com \
    --cc=linux-mm@kvack.org \
    /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