diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-04-23 05:37:17 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-04-23 05:45:20 -0400 |
commit | 6dd29b3df975582ef429b5b93c899e6575785940 (patch) | |
tree | f7f214935c45eb7ea9096fccd4cdace3baa99e68 /mm/gup.c | |
parent | ace2fb5a8b65d6aba530068ea9331f18e10ef565 (diff) |
Revert "x86/mm/gup: Switch GUP to the generic get_user_page_fast() implementation"
This reverts commit 2947ba054a4dabbd82848728d765346886050029.
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: 220ced1676c4 "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: Dan 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: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'mm/gup.c')
-rw-r--r-- | mm/gup.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1155,7 +1155,7 @@ struct page *get_dump_page(unsigned long addr) | |||
1155 | #endif /* CONFIG_ELF_CORE */ | 1155 | #endif /* CONFIG_ELF_CORE */ |
1156 | 1156 | ||
1157 | /* | 1157 | /* |
1158 | * Generic Fast GUP | 1158 | * Generic RCU Fast GUP |
1159 | * | 1159 | * |
1160 | * get_user_pages_fast attempts to pin user pages by walking the page | 1160 | * get_user_pages_fast attempts to pin user pages by walking the page |
1161 | * tables directly and avoids taking locks. Thus the walker needs to be | 1161 | * tables directly and avoids taking locks. Thus the walker needs to be |
@@ -1176,8 +1176,8 @@ struct page *get_dump_page(unsigned long addr) | |||
1176 | * Before activating this code, please be aware that the following assumptions | 1176 | * Before activating this code, please be aware that the following assumptions |
1177 | * are currently made: | 1177 | * are currently made: |
1178 | * | 1178 | * |
1179 | * *) Either HAVE_RCU_TABLE_FREE is enabled, and tlb_remove_table() is used to | 1179 | * *) HAVE_RCU_TABLE_FREE is enabled, and tlb_remove_table is used to free |
1180 | * free pages containing page tables or TLB flushing requires IPI broadcast. | 1180 | * pages containing page tables. |
1181 | * | 1181 | * |
1182 | * *) ptes can be read atomically by the architecture. | 1182 | * *) ptes can be read atomically by the architecture. |
1183 | * | 1183 | * |
@@ -1187,7 +1187,7 @@ struct page *get_dump_page(unsigned long addr) | |||
1187 | * | 1187 | * |
1188 | * This code is based heavily on the PowerPC implementation by Nick Piggin. | 1188 | * This code is based heavily on the PowerPC implementation by Nick Piggin. |
1189 | */ | 1189 | */ |
1190 | #ifdef CONFIG_HAVE_GENERIC_GUP | 1190 | #ifdef CONFIG_HAVE_GENERIC_RCU_GUP |
1191 | 1191 | ||
1192 | #ifndef gup_get_pte | 1192 | #ifndef gup_get_pte |
1193 | /* | 1193 | /* |
@@ -1677,4 +1677,4 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write, | |||
1677 | return ret; | 1677 | return ret; |
1678 | } | 1678 | } |
1679 | 1679 | ||
1680 | #endif /* CONFIG_HAVE_GENERIC_GUP */ | 1680 | #endif /* CONFIG_HAVE_GENERIC_RCU_GUP */ |