[PATCH] Revert "x86/mm/gup: Switch GUP to the generic get_user_page_fast() implementation"
From: Ingo Molnar
Date: Sun Apr 23 2017 - 05:53:07 EST
* Dan Williams <dan.j.williams@xxxxxxxxx> wrote:
> > I can't find the issue either.
> >
> > Is it something reproducible without hardware? In KVM?
>
> You can do it in KVM, just boot with the memmap=ss!nn parameter to
> simulate pmem. In this case I'm booting with memmap=4G!8G, you should
> also specify "nokaslr".
>
> > If yes, could you share the test-case?
>
> Yes, run:
>
> ./autogen.sh
> ./configure CFLAGS='-g -O0' --prefix=/usr --sysconfdir=/etc
> --libdir=/usr/lib64
> make TESTS=device-dax check
>
> ...from a checkout of the ndctl project:
>
> https://github.com/pmem/ndctl
>
> Let me know if you run into any problems getting the test to build or run.
>
> >
> >> [ 35.423841] WARNING: CPU: 8 PID: 245 at lib/percpu-refcount.c:155
> >> percpu_ref_switch_to_atomic_rcu+0x1f5/0x200
> >> [ 35.425328] percpu ref (dax_pmem_percpu_release [dax_pmem]) <= 0
> >> (0) after switching to atomic
Since the bug appears to be pretty severe (GUP race causing possible memory
corruption that could affect a lot of code), and the merge window is awfully
close, plus the reproducer appears to be pretty quick, I've queued up the
revert below for the time being, to not block the rest of the pending
tip:x86/mm changes.
I'd have loved to see this conversion in v4.12, but not at any cost.
Thanks,
Ingo
==================>