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.

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>

authored by

Peng Hao and committed by
Andrew Morton
c44f063e 75060b6e

+2 -2
+2 -2
lib/buildid.c
··· 140 140 return -EFAULT; /* page not mapped */ 141 141 142 142 ret = -EINVAL; 143 - page_addr = kmap_atomic(page); 143 + page_addr = kmap_local_page(page); 144 144 ehdr = (Elf32_Ehdr *)page_addr; 145 145 146 146 /* compare magic x7f "ELF" */ ··· 156 156 else if (ehdr->e_ident[EI_CLASS] == ELFCLASS64) 157 157 ret = get_build_id_64(page_addr, build_id, size); 158 158 out: 159 - kunmap_atomic(page_addr); 159 + kunmap_local(page_addr); 160 160 put_page(page); 161 161 return ret; 162 162 }