| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- From bf670c55337b76ab2449abe15d3fd3c11b14c013 Mon Sep 17 00:00:00 2001
- From: Peter Zijlstra <[email protected]>
- Date: Tue, 5 Dec 2017 13:34:46 +0100
- Subject: [PATCH 177/242] x86/mm: Remove superfluous barriers
- MIME-Version: 1.0
- Content-Type: text/plain; charset=UTF-8
- Content-Transfer-Encoding: 8bit
- CVE-2017-5754
- atomic64_inc_return() already implies smp_mb() before and after.
- Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
- Signed-off-by: Thomas Gleixner <[email protected]>
- Cc: Andy Lutomirski <[email protected]>
- Cc: Boris Ostrovsky <[email protected]>
- Cc: Borislav Petkov <[email protected]>
- Cc: Brian Gerst <[email protected]>
- Cc: Dave Hansen <[email protected]>
- Cc: David Laight <[email protected]>
- Cc: Denys Vlasenko <[email protected]>
- Cc: Eduardo Valentin <[email protected]>
- Cc: Greg KH <[email protected]>
- Cc: H. Peter Anvin <[email protected]>
- Cc: Josh Poimboeuf <[email protected]>
- Cc: Juergen Gross <[email protected]>
- Cc: Linus Torvalds <[email protected]>
- Cc: Peter Zijlstra <[email protected]>
- Cc: Will Deacon <[email protected]>
- Cc: [email protected]
- Cc: [email protected]
- Cc: [email protected]
- Cc: [email protected]
- Cc: [email protected]
- Signed-off-by: Ingo Molnar <[email protected]>
- (cherry picked from commit b5fc6d943808b570bdfbec80f40c6b3855f1c48b)
- Signed-off-by: Andy Whitcroft <[email protected]>
- Signed-off-by: Kleber Sacilotto de Souza <[email protected]>
- (cherry picked from commit 31a37930df33315a7006b46706f6babdb57db1f4)
- Signed-off-by: Fabian Grünbichler <[email protected]>
- ---
- arch/x86/include/asm/tlbflush.h | 8 +-------
- 1 file changed, 1 insertion(+), 7 deletions(-)
- diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
- index 6d2688a6fda0..bc1460b4737b 100644
- --- a/arch/x86/include/asm/tlbflush.h
- +++ b/arch/x86/include/asm/tlbflush.h
- @@ -59,19 +59,13 @@ static inline void invpcid_flush_all_nonglobals(void)
-
- static inline u64 inc_mm_tlb_gen(struct mm_struct *mm)
- {
- - u64 new_tlb_gen;
- -
- /*
- * Bump the generation count. This also serves as a full barrier
- * that synchronizes with switch_mm(): callers are required to order
- * their read of mm_cpumask after their writes to the paging
- * structures.
- */
- - smp_mb__before_atomic();
- - new_tlb_gen = atomic64_inc_return(&mm->context.tlb_gen);
- - smp_mb__after_atomic();
- -
- - return new_tlb_gen;
- + return atomic64_inc_return(&mm->context.tlb_gen);
- }
-
- #ifdef CONFIG_PARAVIRT
- --
- 2.14.2
|