Skip to content

Commit

Permalink
powerpc/64s: Prevent fallthrough to hash TLB flush when using radix
Browse files Browse the repository at this point in the history
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: 1665c02 ("powerpc/64s: Reconnect tlb_flush() to hash__tlb_flush()")
Reported-by: "Erhard F." <[email protected]>
Suggested-by: Christophe Leroy <[email protected]>
Signed-off-by: Benjamin Gray <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
BenjaminGrayNp1 authored and mpe committed Feb 17, 2023
1 parent 2ea31e2 commit 4302abc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/powerpc/include/asm/book3s/64/tlbflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4302abc

Please sign in to comment.