Skip to content

Commit c44f063

Browse files
flying-122akpm00
authored andcommitted
buildid: use kmap_local_page()
Use kmap_local_page() instead of kmap_atomic() which has been deprecated. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Peng Hao <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 75060b6 commit c44f063

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/buildid.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ int build_id_parse(struct vm_area_struct *vma, unsigned char *build_id,
140140
return -EFAULT; /* page not mapped */
141141

142142
ret = -EINVAL;
143-
page_addr = kmap_atomic(page);
143+
page_addr = kmap_local_page(page);
144144
ehdr = (Elf32_Ehdr *)page_addr;
145145

146146
/* compare magic x7f "ELF" */
@@ -156,7 +156,7 @@ int build_id_parse(struct vm_area_struct *vma, unsigned char *build_id,
156156
else if (ehdr->e_ident[EI_CLASS] == ELFCLASS64)
157157
ret = get_build_id_64(page_addr, build_id, size);
158158
out:
159-
kunmap_atomic(page_addr);
159+
kunmap_local(page_addr);
160160
put_page(page);
161161
return ret;
162162
}

0 commit comments

Comments
 (0)