summaryrefslogtreecommitdiff
path: root/kernel/bpf/ringbuf.c
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2025-02-28 12:37:14 +0100
committerUlf Hansson <ulf.hansson@linaro.org>2025-02-28 12:37:14 +0100
commitc432bdcf39d52cbba7487d4ebfcf735cee59481e (patch)
tree5235fe21993c9fb04cbada15ed940961068258c3 /kernel/bpf/ringbuf.c
parent36ccabe59ddacefd79b7dfa4a66359385f22eed4 (diff)
parentd082ecbc71e9e0bf49883ee4afd435a77a5101b6 (diff)
pmdomain: Merge tag 'v6.14-rc4' from Linus into next
Linux 6.14-rc4
Diffstat (limited to 'kernel/bpf/ringbuf.c')
-rw-r--r--kernel/bpf/ringbuf.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/kernel/bpf/ringbuf.c b/kernel/bpf/ringbuf.c
index e1cfe890e0be..1499d8caa9a3 100644
--- a/kernel/bpf/ringbuf.c
+++ b/kernel/bpf/ringbuf.c
@@ -268,8 +268,6 @@ static int ringbuf_map_mmap_kern(struct bpf_map *map, struct vm_area_struct *vma
/* allow writable mapping for the consumer_pos only */
if (vma->vm_pgoff != 0 || vma->vm_end - vma->vm_start != PAGE_SIZE)
return -EPERM;
- } else {
- vm_flags_clear(vma, VM_MAYWRITE);
}
/* remap_vmalloc_range() checks size and offset constraints */
return remap_vmalloc_range(vma, rb_map->rb,
@@ -289,8 +287,6 @@ static int ringbuf_map_mmap_user(struct bpf_map *map, struct vm_area_struct *vma
* position, and the ring buffer data itself.
*/
return -EPERM;
- } else {
- vm_flags_clear(vma, VM_MAYWRITE);
}
/* remap_vmalloc_range() checks size and offset constraints */
return remap_vmalloc_range(vma, rb_map->rb, vma->vm_pgoff + RINGBUF_PGOFF);