From: Greg Kroah-Hartman Date: Thu, 23 May 2019 05:48:31 +0000 (+0200) Subject: 5.0-stable patches X-Git-Tag: v5.1.5~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=74fa026fc3c85b994492dd0ddd585a779fea0822;p=thirdparty%2Fkernel%2Fstable-queue.git 5.0-stable patches added patches: mm-gup-remove-the-write-parameter-from-gup_fast_permitted.patch --- diff --git a/queue-5.0/mm-gup-remove-the-write-parameter-from-gup_fast_permitted.patch b/queue-5.0/mm-gup-remove-the-write-parameter-from-gup_fast_permitted.patch new file mode 100644 index 00000000000..25c631afa24 --- /dev/null +++ b/queue-5.0/mm-gup-remove-the-write-parameter-from-gup_fast_permitted.patch @@ -0,0 +1,72 @@ +From ad8cfb9c42ef83ecf4079bc7d77e6557648e952b Mon Sep 17 00:00:00 2001 +From: Ira Weiny +Date: Sun, 10 Feb 2019 14:34:24 -0800 +Subject: mm/gup: Remove the 'write' parameter from gup_fast_permitted() + +From: Ira Weiny + +commit ad8cfb9c42ef83ecf4079bc7d77e6557648e952b upstream. + +The 'write' parameter is unused in gup_fast_permitted() so remove it. + +Signed-off-by: Ira Weiny +Acked-by: Kirill A. Shutemov +Reviewed-by: Thomas Gleixner +Cc: Andrew Morton +Cc: Borislav Petkov +Cc: Dan Williams +Cc: Dave Hansen +Cc: Linus Torvalds +Cc: Peter Zijlstra +Cc: linux-mm@kvack.org +Link: http://lkml.kernel.org/r/20190210223424.13934-1-ira.weiny@intel.com +Signed-off-by: Ingo Molnar +Cc: Justin Forbes +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/include/asm/pgtable_64.h | 3 +-- + mm/gup.c | 6 +++--- + 2 files changed, 4 insertions(+), 5 deletions(-) + +--- a/arch/x86/include/asm/pgtable_64.h ++++ b/arch/x86/include/asm/pgtable_64.h +@@ -259,8 +259,7 @@ extern void init_extra_mapping_uc(unsign + extern void init_extra_mapping_wb(unsigned long phys, unsigned long size); + + #define gup_fast_permitted gup_fast_permitted +-static inline bool gup_fast_permitted(unsigned long start, int nr_pages, +- int write) ++static inline bool gup_fast_permitted(unsigned long start, int nr_pages) + { + unsigned long len, end; + +--- a/mm/gup.c ++++ b/mm/gup.c +@@ -1811,7 +1811,7 @@ static void gup_pgd_range(unsigned long + * Check if it's allowed to use __get_user_pages_fast() for the range, or + * we need to fall back to the slow version: + */ +-bool gup_fast_permitted(unsigned long start, int nr_pages, int write) ++bool gup_fast_permitted(unsigned long start, int nr_pages) + { + unsigned long len, end; + +@@ -1853,7 +1853,7 @@ int __get_user_pages_fast(unsigned long + * block IPIs that come from THPs splitting. + */ + +- if (gup_fast_permitted(start, nr_pages, write)) { ++ if (gup_fast_permitted(start, nr_pages)) { + local_irq_save(flags); + gup_pgd_range(start, end, write, pages, &nr); + local_irq_restore(flags); +@@ -1895,7 +1895,7 @@ int get_user_pages_fast(unsigned long st + if (unlikely(!access_ok((void __user *)start, len))) + return -EFAULT; + +- if (gup_fast_permitted(start, nr_pages, write)) { ++ if (gup_fast_permitted(start, nr_pages)) { + local_irq_disable(); + gup_pgd_range(addr, end, write, pages, &nr); + local_irq_enable(); diff --git a/queue-5.0/series b/queue-5.0/series index f46f15ed7ef..382ae8a6f0b 100644 --- a/queue-5.0/series +++ b/queue-5.0/series @@ -16,3 +16,4 @@ net-mlx5e-add-missing-ethtool-driver-info-for-representors.patch net-mlx5e-additional-check-for-flow-destination-comparison.patch net-mlx5-imply-mlxfw-in-mlx5_core.patch net-mlx5e-fix-ethtool-rxfh-commands-when-config_mlx5_en_rxnfc-is-disabled.patch +mm-gup-remove-the-write-parameter-from-gup_fast_permitted.patch