]> git.baikalelectronics.ru Git - kernel.git/commit
HWPOISON: Use get_user_page_fast in hwpoison madvise
authorAndi Kleen <andi@firstfloor.org>
Wed, 16 Dec 2009 11:20:00 +0000 (12:20 +0100)
committerAndi Kleen <ak@linux.intel.com>
Wed, 16 Dec 2009 11:20:00 +0000 (12:20 +0100)
commit1300b390099b3a70094c261fdd7969c7fdd23155
tree6c12d3c738c3118ccab724b5b984fc07c7e58082
parente31dda3f0e3da18bf1d74d4b3b83c621ca022484
HWPOISON: Use get_user_page_fast in hwpoison madvise

The previous version didn't take the mmap_sem before calling gup(),
which is racy.

Use get_user_pages_fast() instead which doesn't need any locks.
This is also faster of course, but then it doesn't really matter
because this is just a testing path.

Based on report from Nick Piggin.
Cc: npiggin@suse.de
Signed-off-by: Andi Kleen <ak@linux.intel.com>
mm/madvise.c