• Ingo Molnar's avatar
    Revert "x86/mm/gup: Switch GUP to the generic get_user_page_fast() implementation" · 6dd29b3d
    Ingo Molnar authored
    This reverts commit 2947ba05.
    Dan Williams reported dax-pmem kernel warnings with the following signature:
       WARNING: CPU: 8 PID: 245 at lib/percpu-refcount.c:155 percpu_ref_switch_to_atomic_rcu+0x1f5/0x200
       percpu ref (dax_pmem_percpu_release [dax_pmem]) <= 0 (0) after switching to atomic
    ... and bisected it to this commit, which suggests possible memory corruption
    caused by the x86 fast-GUP conversion.
    He also pointed out:
      This is similar to the backtrace when we were not properly handling
      pud faults and was fixed with this commit: 220ced16
     "mm: fix
      get_user_pages() vs device-dax pud mappings"
      I've found some missing _devmap checks in the generic
      get_user_pages_fast() path, but this does not fix the regression
    So given that there are known bugs, and a pretty robust looking bisection
    points to this commit suggesting that are unknown bugs in the conversion
    as well, revert it for the time being - we'll re-try in v4.13.
    Reported-by: default avatarDan Williams <dan.j.williams@intel.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Michal Hocko <mhocko@suse.cz>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Rik van Riel <riel@redhat.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: aneesh.kumar@linux.vnet.ibm.com
    Cc: dann.frazier@canonical.com
    Cc: dave.hansen@intel.com
    Cc: steve.capper@linaro.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>