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 21:48:03 +1100 [thread overview]
Message-ID: <20091208104803.GC3511@nick> (raw)
In-Reply-To: <20091208112623.GX18989@one.firstfloor.org>
On Tue, Dec 08, 2009 at 12:26:23PM +0100, Andi Kleen wrote:
> On Tue, Dec 08, 2009 at 12:24:12PM +0100, Nick Piggin wrote:
> > Hi,
> >
> > Seems like the madvise hwpoison code is ugly and buggy, not to
> > put too fine a point on it :)
> >
> > Ugly: it should have just followed the same pattern as the other
> > transient advices.
>
> That wouldn't work.
Of course it will. You may have no need to be given the actual
vma, but that's no big deal. Much better than making up your own
way of doing things.
> > 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.
Nick
--
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>
next prev parent reply other threads:[~2009-12-08 11:50 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 [this message]
2009-12-08 12:01 ` Andi Kleen
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=20091208104803.GC3511@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