From 4ca0e14cab02fdf5ff0bb22e816f68a9df7927cd Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 4 Nov 2025 07:45:24 +0900 Subject: [PATCH] fix up queue-5.15/bpf-sync-pending-irq-work-before-freeing-ring-buffer.patch --- ...-irq-work-before-freeing-ring-buffer.patch | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/queue-5.15/bpf-sync-pending-irq-work-before-freeing-ring-buffer.patch b/queue-5.15/bpf-sync-pending-irq-work-before-freeing-ring-buffer.patch index 8ea97f9b2f..1b91503880 100644 --- a/queue-5.15/bpf-sync-pending-irq-work-before-freeing-ring-buffer.patch +++ b/queue-5.15/bpf-sync-pending-irq-work-before-freeing-ring-buffer.patch @@ -25,22 +25,17 @@ Link: https://lore.kernel.org/r/20251020180301.103366-1-nooraineqbal@gmail.com Signed-off-by: Alexei Starovoitov Signed-off-by: Sasha Levin --- - kernel/bpf/ringbuf.c | 2 ++ + kernel/bpf/ringbuf.c | 2 ++ 1 file changed, 2 insertions(+) -diff --git a/kernel/bpf/ringbuf.c b/kernel/bpf/ringbuf.c -index eb6ff0d0c06b6..5798d6dbdcb43 100644 --- a/kernel/bpf/ringbuf.c +++ b/kernel/bpf/ringbuf.c -@@ -184,6 +184,8 @@ static struct bpf_map *ringbuf_map_alloc(union bpf_attr *attr) +@@ -190,6 +190,8 @@ static void bpf_ringbuf_free(struct bpf_ + struct page **pages = rb->pages; + int i, nr_pages = rb->nr_pages; - static void bpf_ringbuf_free(struct bpf_ringbuf *rb) - { + irq_work_sync(&rb->work); + - /* copy pages pointer and nr_pages to local variable, as we are going - * to unmap rb itself with vunmap() below - */ --- -2.51.0 - + vunmap(rb); + for (i = 0; i < nr_pages; i++) + __free_page(pages[i]); -- 2.47.3