Patch "LoongArch: Replace kmap_atomic() with kmap_local_page() in copy_user_highpage()" has been added to the 6.1-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

    LoongArch: Replace kmap_atomic() with kmap_local_page() in copy_user_highpage()

to the 6.1-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:
     loongarch-replace-kmap_atomic-with-kmap_local_page-i.patch
and it can be found in the queue-6.1 subdirectory.

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



commit ab81980ade9ef98a1b0dfca0cf4a44b7e0ff891d
Author: Huacai Chen <chenhuacai@xxxxxxxxxx>
Date:   Wed Oct 18 08:42:52 2023 +0800

    LoongArch: Replace kmap_atomic() with kmap_local_page() in copy_user_highpage()
    
    [ Upstream commit 477a0ebec101359f49d92796e3b609857d564b52 ]
    
    Replace kmap_atomic()/kunmap_atomic() calls with kmap_local_page()/
    kunmap_local() in copy_user_highpage() which can be invoked from both
    preemptible and atomic context [1].
    
    [1] https://lore.kernel.org/all/20201029222652.302358281@xxxxxxxxxxxxx/
    
    Suggested-by: Deepak R Varma <drv@xxxxxxxxx>
    Signed-off-by: Huacai Chen <chenhuacai@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/loongarch/mm/init.c b/arch/loongarch/mm/init.c
index c74da7770e39e..f42a3be5f28d7 100644
--- a/arch/loongarch/mm/init.c
+++ b/arch/loongarch/mm/init.c
@@ -68,11 +68,11 @@ void copy_user_highpage(struct page *to, struct page *from,
 {
 	void *vfrom, *vto;
 
-	vto = kmap_atomic(to);
-	vfrom = kmap_atomic(from);
+	vfrom = kmap_local_page(from);
+	vto = kmap_local_page(to);
 	copy_page(vto, vfrom);
-	kunmap_atomic(vfrom);
-	kunmap_atomic(vto);
+	kunmap_local(vfrom);
+	kunmap_local(vto);
 	/* Make sure this page is cleared on other CPU's too before using it */
 	smp_wmb();
 }



[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