From 1f2cf3777dbddcdebd3d92025bbe187ea549e068 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 4 Sep 2018 19:23:04 +0200 Subject: [PATCH] 4.18-stable patches added patches: mm-move-tlb_table_flush-to-tlb_flush_mmu_free.patch --- ...lb_table_flush-to-tlb_flush_mmu_free.patch | 49 +++++++++++++++++++ queue-4.18/series | 1 + 2 files changed, 50 insertions(+) create mode 100644 queue-4.18/mm-move-tlb_table_flush-to-tlb_flush_mmu_free.patch diff --git a/queue-4.18/mm-move-tlb_table_flush-to-tlb_flush_mmu_free.patch b/queue-4.18/mm-move-tlb_table_flush-to-tlb_flush_mmu_free.patch new file mode 100644 index 00000000000..d163fa293b4 --- /dev/null +++ b/queue-4.18/mm-move-tlb_table_flush-to-tlb_flush_mmu_free.patch @@ -0,0 +1,49 @@ +From db7ddef301128dad394f1c0f77027f86ee9a4edb Mon Sep 17 00:00:00 2001 +From: Nicholas Piggin +Date: Thu, 23 Aug 2018 18:47:08 +1000 +Subject: mm: move tlb_table_flush to tlb_flush_mmu_free + +From: Nicholas Piggin + +commit db7ddef301128dad394f1c0f77027f86ee9a4edb upstream. + +There is no need to call this from tlb_flush_mmu_tlbonly, it logically +belongs with tlb_flush_mmu_free. This makes future fixes simpler. + +[ This was originally done to allow code consolidation for the + mmu_notifier fix, but it also ends up helping simplify the + HAVE_RCU_TABLE_INVALIDATE fix. - Linus ] + +Signed-off-by: Nicholas Piggin +Acked-by: Will Deacon +Cc: Peter Zijlstra +Cc: stable@kernel.org +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/memory.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/mm/memory.c ++++ b/mm/memory.c +@@ -245,9 +245,6 @@ static void tlb_flush_mmu_tlbonly(struct + + tlb_flush(tlb); + mmu_notifier_invalidate_range(tlb->mm, tlb->start, tlb->end); +-#ifdef CONFIG_HAVE_RCU_TABLE_FREE +- tlb_table_flush(tlb); +-#endif + __tlb_reset_range(tlb); + } + +@@ -255,6 +252,9 @@ static void tlb_flush_mmu_free(struct mm + { + struct mmu_gather_batch *batch; + ++#ifdef CONFIG_HAVE_RCU_TABLE_FREE ++ tlb_table_flush(tlb); ++#endif + for (batch = &tlb->local; batch && batch->nr; batch = batch->next) { + free_pages_and_swap_cache(batch->pages, batch->nr); + batch->nr = 0; diff --git a/queue-4.18/series b/queue-4.18/series index f45c3d8d7f4..8465cf6d79c 100644 --- a/queue-4.18/series +++ b/queue-4.18/series @@ -120,4 +120,5 @@ power-generic-adc-battery-check-for-duplicate-properties-copied-from-iio-channel watchdog-mark-watchdog-touch-functions-as-notrace.patch cdrom-fix-info-leak-oob-read-in-cdrom_ioctl_drive_status.patch x86-dumpstack-don-t-dump-kernel-memory-based-on-usermode-rip.patch +mm-move-tlb_table_flush-to-tlb_flush_mmu_free.patch x86-kvm-avoid-unused-variable-warning.patch -- 2.47.3