summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPeng Hao <flyingpeng@tencent.com>2024-03-06 11:48:04 +0800
committerAndrew Morton <akpm@linux-foundation.org>2024-03-12 13:09:23 -0700
commitc44f063e740ed580574b9012751e641e749bbe0e (patch)
treedc06b0b6889cb26dca085aa63b1cb5708c13d52e /lib
parent75060b6ead0e93b7b43a451ba1e13c49b1aa2025 (diff)
buildid: use kmap_local_page()
Use kmap_local_page() instead of kmap_atomic() which has been deprecated. Link: https://lkml.kernel.org/r/20240306034804.62087-1-flyingpeng@tencent.com Signed-off-by: Peng Hao <flyingpeng@tencent.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/buildid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/buildid.c b/lib/buildid.c
index e3a7acdeef0e..29fdfb4cccf0 100644
--- a/lib/buildid.c
+++ b/lib/buildid.c
@@ -140,7 +140,7 @@ int build_id_parse(struct vm_area_struct *vma, unsigned char *build_id,
return -EFAULT; /* page not mapped */
ret = -EINVAL;
- page_addr = kmap_atomic(page);
+ page_addr = kmap_local_page(page);
ehdr = (Elf32_Ehdr *)page_addr;
/* compare magic x7f "ELF" */
@@ -156,7 +156,7 @@ int build_id_parse(struct vm_area_struct *vma, unsigned char *build_id,
else if (ehdr->e_ident[EI_CLASS] == ELFCLASS64)
ret = get_build_id_64(page_addr, build_id, size);
out:
- kunmap_atomic(page_addr);
+ kunmap_local(page_addr);
put_page(page);
return ret;
}