Skip to contentSkip to conversation

powerpc/64s: Prevent fallthrough to hash TLB flush when using radix

PATCH Applied Benjamin Gray 2 participants 2 messages Feb 17, 2023 – Feb 20, 2023 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/64s: Prevent fallthrough to hash TLB flush when using radix

In the fix reconnecting hash__tlb_flush() to tlb_flush() the void return on radix__tlb_flush() was not restored and subsequently falls through to the restored hash__tlb_flush().

Guard hash__tlb_flush() under an else to prevent this.

Fixes 1665c027afb2 ("powerpc/64s: Reconnect tlb_flush() to hash__tlb_flush()")

---

Bug report:
https://lore.kernel.org/linuxppc-dev/20230216005535.6bff7aa6@yea/

---
 arch/powerpc/include/asm/book3s/64/tlbflush.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/include/asm/book3s/64/tlbflush.h +2 -2
index d5cd16270c5d..2bbc0fcce04a 100644
@@ -97,8 +97,8 @@ static inline void tlb_flush(struct mmu_gather *tlb)
 {
 	if (radix_enabled())
 		radix__tlb_flush(tlb);
-
-	return hash__tlb_flush(tlb);
+	else
+		hash__tlb_flush(tlb);
 }
 
 #ifdef CONFIG_SMP

base-commit: 0bfb97203f5f300777624a2ad6f8f84aea3e8658 --
2.39.1

#1 lore raw
Quoted 8 lines · Benjamin Gray

In the fix reconnecting hash__tlb_flush() to tlb_flush() the void return on radix__tlb_flush() was not restored and subsequently falls through to the restored hash__tlb_flush().

Guard hash__tlb_flush() under an else to prevent this.

[...]

Applied to powerpc/fixes.

[1/1] powerpc/64s: Prevent fallthrough to hash TLB flush when using radix

      https://git.kernel.org/powerpc/c/4302abc628fc0dc08e5855f21bbfaed407a72bc3

cheers