linux/arch
Dan Williams 220ced1676 mm: fix get_user_pages() vs device-dax pud mappings
A new unit test for the device-dax 1GB enabling currently fails with
this warning before hanging the test thread:

 WARNING: CPU: 0 PID: 21 at lib/percpu-refcount.c:155 percpu_ref_switch_to_atomic_rcu+0x1e3/0x1f0
 percpu ref (dax_pmem_percpu_release [dax_pmem]) <= 0 (0) after switching to atomic
 [..]
 CPU: 0 PID: 21 Comm: rcuos/1 Tainted: G           O    4.10.0-rc7-next-20170207+ #944
 [..]
 Call Trace:
  dump_stack+0x86/0xc3
  __warn+0xcb/0xf0
  warn_slowpath_fmt+0x5f/0x80
  ? rcu_nocb_kthread+0x27a/0x510
  ? dax_pmem_percpu_exit+0x50/0x50 [dax_pmem]
  percpu_ref_switch_to_atomic_rcu+0x1e3/0x1f0
  ? percpu_ref_exit+0x60/0x60
  rcu_nocb_kthread+0x339/0x510
  ? rcu_nocb_kthread+0x27a/0x510
  kthread+0x101/0x140

The get_user_pages() path needs to arrange for references to be taken
against the dev_pagemap instance backing the pud mapping.  Refactor the
existing __gup_device_huge_pmd() to also account for the pud case.

Link: http://lkml.kernel.org/r/148653181153.38226.9605457830505509385.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Nilesh Choudhury <nilesh.choudhury@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-24 17:46:54 -08:00
..
alpha Final extable.h related changes. 2017-02-21 14:28:55 -08:00
arc ARC updates for 4.11 rc1 2017-02-22 10:33:53 -08:00
arm ARM: SoC driver updates 2017-02-23 15:57:04 -08:00
arm64 ARM: 64-bit DT updates for v4.11 2017-02-23 15:52:14 -08:00
avr32 sched/cputime: Remove generic asm headers 2017-02-01 09:14:07 +01:00
blackfin Less anger inducing pull request for 4.11 2017-02-23 18:58:18 -08:00
c6x sched/cputime: Remove generic asm headers 2017-02-01 09:14:07 +01:00
cris cris: use generic current.h 2017-02-24 17:46:53 -08:00
frv Final extable.h related changes. 2017-02-21 14:28:55 -08:00
h8300 sched/cputime: Remove generic asm headers 2017-02-01 09:14:07 +01:00
hexagon Final extable.h related changes. 2017-02-21 14:28:55 -08:00
ia64 arch, mm: remove arch specific show_mem 2017-02-22 16:41:30 -08:00
m32r m32r: fix build warning 2017-02-22 16:41:27 -08:00
m68k powerpc updates for 4.11 part 1. 2017-02-22 10:30:38 -08:00
metag Final extable.h related changes. 2017-02-21 14:28:55 -08:00
microblaze Final extable.h related changes. 2017-02-21 14:28:55 -08:00
mips 4.11 is going to be a relatively large release for KVM, with a little over 2017-02-22 18:22:53 -08:00
mn10300 Final extable.h related changes. 2017-02-21 14:28:55 -08:00
nios2 Final extable.h related changes. 2017-02-21 14:28:55 -08:00
openrisc Final extable.h related changes. 2017-02-21 14:28:55 -08:00
parisc arch, mm: remove arch specific show_mem 2017-02-22 16:41:30 -08:00
powerpc mm, fs: reduce fault, page_mkwrite, and pfn_mkwrite to take only vmf 2017-02-24 17:46:54 -08:00
s390 memblock: embed memblock type name within struct memblock_type 2017-02-24 17:46:54 -08:00
score score: remove asm/current.h 2017-02-22 16:41:27 -08:00
sh TTY/Serial driver patches for 4.11-rc1 2017-02-22 12:17:25 -08:00
sparc lib/show_mem.c: teach show_mem to work with the given nodemask 2017-02-22 16:41:30 -08:00
tile arch, mm: remove arch specific show_mem 2017-02-22 16:41:30 -08:00
um Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-02-20 13:23:30 -08:00
unicore32 arch, mm: remove arch specific show_mem 2017-02-22 16:41:30 -08:00
x86 mm: fix get_user_pages() vs device-dax pud mappings 2017-02-24 17:46:54 -08:00
xtensa Final extable.h related changes. 2017-02-21 14:28:55 -08:00
.gitignore
Kconfig mm, x86: add support for PUD-sized transparent hugepages 2017-02-24 17:46:54 -08:00