summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2018-08-22 17:30:14 +0200
committerBen Hutchings <ben@decadent.org.uk>2018-12-16 22:08:52 +0000
commit52c01119020ede1f4f935ed1f81f7f418eca69b1 (patch)
tree8a3dd2980ca8710ffc42c996d76afcfa080ce389 /mm
parent32e0dc1b86fad6e0da8691c90af2e0d2a1160329 (diff)
downloadlinux-stable-52c01119020ede1f4f935ed1f81f7f418eca69b1.tar.gz
linux-stable-52c01119020ede1f4f935ed1f81f7f418eca69b1.tar.bz2
linux-stable-52c01119020ede1f4f935ed1f81f7f418eca69b1.zip
mm/tlb: Remove tlb_remove_table() non-concurrent condition
commit a6f572084fbee8b30f91465f4a085d7a90901c57 upstream. Will noted that only checking mm_users is incorrect; we should also check mm_count in order to cover CPUs that have a lazy reference to this mm (and could do speculative TLB operations). If removing this turns out to be a performance issue, we can re-instate a more complete check, but in tlb_table_flush() eliding the call_rcu_sched(). Fixes: 267239116987 ("mm, powerpc: move the RCU page-table freeing into generic code") Reported-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Rik van Riel <riel@surriel.com> Acked-by: Will Deacon <will.deacon@arm.com> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: David Miller <davem@davemloft.net> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'mm')
-rw-r--r--mm/memory.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 582d689c12b6..62c2c8a148b0 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -359,15 +359,6 @@ void tlb_remove_table(struct mmu_gather *tlb, void *table)
tlb->need_flush = 1;
- /*
- * When there's less then two users of this mm there cannot be a
- * concurrent page-table walk.
- */
- if (atomic_read(&tlb->mm->mm_users) < 2) {
- __tlb_remove_table(table);
- return;
- }
-
if (*batch == NULL) {
*batch = (struct mmu_table_batch *)__get_free_page(GFP_NOWAIT | __GFP_NOWARN);
if (*batch == NULL) {