Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fs/coredump: use kmap_local_page()

In dump_user_range() there is no reason for the mapping to be global. Use
kmap_local_page() rather than kmap.

Link: https://lkml.kernel.org/r/20210203223328.558945-1-ira.weiny@intel.com
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Ira Weiny and committed by
Linus Torvalds
3159ed57 f9c8bc46

+2 -2
+2 -2
fs/coredump.c
··· 897 897 */ 898 898 page = get_dump_page(addr); 899 899 if (page) { 900 - void *kaddr = kmap(page); 900 + void *kaddr = kmap_local_page(page); 901 901 902 902 stop = !dump_emit(cprm, kaddr, PAGE_SIZE); 903 - kunmap(page); 903 + kunmap_local(kaddr); 904 904 put_page(page); 905 905 } else { 906 906 stop = !dump_skip(cprm, PAGE_SIZE);