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>
This commit is contained in:
parent
f9c8bc4604
commit
3159ed5779
1 changed files with 2 additions and 2 deletions
|
@ -897,10 +897,10 @@ int dump_user_range(struct coredump_params *cprm, unsigned long start,
|
||||||
*/
|
*/
|
||||||
page = get_dump_page(addr);
|
page = get_dump_page(addr);
|
||||||
if (page) {
|
if (page) {
|
||||||
void *kaddr = kmap(page);
|
void *kaddr = kmap_local_page(page);
|
||||||
|
|
||||||
stop = !dump_emit(cprm, kaddr, PAGE_SIZE);
|
stop = !dump_emit(cprm, kaddr, PAGE_SIZE);
|
||||||
kunmap(page);
|
kunmap_local(kaddr);
|
||||||
put_page(page);
|
put_page(page);
|
||||||
} else {
|
} else {
|
||||||
stop = !dump_skip(cprm, PAGE_SIZE);
|
stop = !dump_skip(cprm, PAGE_SIZE);
|
||||||
|
|
Loading…
Add table
Reference in a new issue