mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
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>
This commit is contained in:
parent
75060b6ead
commit
c44f063e74
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user