All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/64s: Prevent fallthrough to hash TLB flush when using radix
@ 2023-02-17  1:14 Benjamin Gray
  2023-02-20  3:41 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Gray @ 2023-02-17  1:14 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: 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.

Fixes: 1665c027afb2 ("powerpc/64s: Reconnect tlb_flush() to hash__tlb_flush()")
Suggested-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>

---

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(-)

diff --git a/arch/powerpc/include/asm/book3s/64/tlbflush.h b/arch/powerpc/include/asm/book3s/64/tlbflush.h
index d5cd16270c5d..2bbc0fcce04a 100644
--- a/arch/powerpc/include/asm/book3s/64/tlbflush.h
+++ b/arch/powerpc/include/asm/book3s/64/tlbflush.h
@@ -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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] powerpc/64s: Prevent fallthrough to hash TLB flush when using radix
  2023-02-17  1:14 [PATCH] powerpc/64s: Prevent fallthrough to hash TLB flush when using radix Benjamin Gray
@ 2023-02-20  3:41 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2023-02-20  3:41 UTC (permalink / raw)
  To: linuxppc-dev, Benjamin Gray

On Fri, 17 Feb 2023 12:14:34 +1100, Benjamin Gray wrote:
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-20  3:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-17  1:14 [PATCH] powerpc/64s: Prevent fallthrough to hash TLB flush when using radix Benjamin Gray
2023-02-20  3:41 ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.