diff options
Diffstat (limited to 'kernel/bpf/stackmap.c')
| -rw-r--r-- | kernel/bpf/stackmap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/bpf/stackmap.c b/kernel/bpf/stackmap.c index 90daf285de03..d9e2483669d0 100644 --- a/kernel/bpf/stackmap.c +++ b/kernel/bpf/stackmap.c | |||
| @@ -260,7 +260,7 @@ static int stack_map_get_build_id(struct vm_area_struct *vma, | |||
| 260 | return -EFAULT; /* page not mapped */ | 260 | return -EFAULT; /* page not mapped */ |
| 261 | 261 | ||
| 262 | ret = -EINVAL; | 262 | ret = -EINVAL; |
| 263 | page_addr = page_address(page); | 263 | page_addr = kmap_atomic(page); |
| 264 | ehdr = (Elf32_Ehdr *)page_addr; | 264 | ehdr = (Elf32_Ehdr *)page_addr; |
| 265 | 265 | ||
| 266 | /* compare magic x7f "ELF" */ | 266 | /* compare magic x7f "ELF" */ |
| @@ -276,6 +276,7 @@ static int stack_map_get_build_id(struct vm_area_struct *vma, | |||
| 276 | else if (ehdr->e_ident[EI_CLASS] == ELFCLASS64) | 276 | else if (ehdr->e_ident[EI_CLASS] == ELFCLASS64) |
| 277 | ret = stack_map_get_build_id_64(page_addr, build_id); | 277 | ret = stack_map_get_build_id_64(page_addr, build_id); |
| 278 | out: | 278 | out: |
| 279 | kunmap_atomic(page_addr); | ||
| 279 | put_page(page); | 280 | put_page(page); |
| 280 | return ret; | 281 | return ret; |
| 281 | } | 282 | } |
