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

> > > 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.

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.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

--
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:02 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 [this message]
2009-12-08 11:05       ` Nick Piggin

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