Patch "riscv: Flush the tlb when a page directory is freed" has been added to the 6.7-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    riscv: Flush the tlb when a page directory is freed

to the 6.7-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     riscv-flush-the-tlb-when-a-page-directory-is-freed.patch
and it can be found in the queue-6.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 71994de817d1b9ea6e4d156f2ee2b30fbcbf04cb
Author: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
Date:   Sun Jan 28 13:04:05 2024 +0100

    riscv: Flush the tlb when a page directory is freed
    
    [ Upstream commit 97cf301fa42e8ea6e0a24de97bc0abcdc87d9504 ]
    
    The riscv privileged specification mandates to flush the TLB whenever a
    page directory is modified, so add that to tlb_flush().
    
    Fixes: c5e9b2c2ae82 ("riscv: Improve tlb_flush()")
    Signed-off-by: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
    Reviewed-by: Charlie Jenkins <charlie@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240128120405.25876-1-alexghiti@xxxxxxxxxxxx
    Signed-off-by: Palmer Dabbelt <palmer@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/riscv/include/asm/tlb.h b/arch/riscv/include/asm/tlb.h
index 1eb5682b2af6..50b63b5c15bd 100644
--- a/arch/riscv/include/asm/tlb.h
+++ b/arch/riscv/include/asm/tlb.h
@@ -16,7 +16,7 @@ static void tlb_flush(struct mmu_gather *tlb);
 static inline void tlb_flush(struct mmu_gather *tlb)
 {
 #ifdef CONFIG_MMU
-	if (tlb->fullmm || tlb->need_flush_all)
+	if (tlb->fullmm || tlb->need_flush_all || tlb->freed_tables)
 		flush_tlb_mm(tlb->mm);
 	else
 		flush_tlb_mm_range(tlb->mm, tlb->start, tlb->end,




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux