diff options
author | 2023-11-20 15:24:05 +0100 | |
---|---|---|
committer | 2023-12-10 16:51:49 -0800 | |
commit | 24d2613a6356f9c4a0b1b8e17f125562f6c8e11b (patch) | |
tree | 02a8712af8bceb229f1b7a31b3e15b9d7eea0b95 /mm/mempool.c | |
parent | mm/ksm: use kmap_local_page() in calc_checksum() (diff) | |
download | wireguard-linux-24d2613a6356f9c4a0b1b8e17f125562f6c8e11b.tar.xz wireguard-linux-24d2613a6356f9c4a0b1b8e17f125562f6c8e11b.zip |
mm/memory: use kmap_local_page() in __wp_page_copy_user()
kmap_atomic() has been deprecated in favor of kmap_local_{folio,page}.
Therefore, replace kmap_atomic() with kmap_local_page in
__wp_page_copy_user().
kmap_atomic() disables preemption in !PREEMPT_RT kernels and
unconditionally disables also page-faults. My limited knowledge of the
implementation of __wp_page_copy_user() makes me think that the latter
side effect is still needed here, but kmap_local_page() is implemented not
to disable page-faults.
So, in addition to the conversion to local mapping, add explicit
pagefault_disable() / pagefault_enable() between mapping and un-mapping.
Link: https://lkml.kernel.org/r/20231120142418.6977-1-fmdefrancesco@gmail.com
Signed-off-by: Fabio M. De Francesco <fabio.maria.de.francesco@linux.intel.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/mempool.c')
0 files changed, 0 insertions, 0 deletions