From: Sasha Levin Date: Mon, 5 Dec 2022 06:24:15 +0000 (-0500) Subject: Fix up backport of queue-5.10/libbpf-handle-size-overflow-for-ringbuf-mmap.patch X-Git-Tag: v4.9.335~28^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7a306e1c6d6b7ede5cef4625cb5831212140ee9;p=thirdparty%2Fkernel%2Fstable-queue.git Fix up backport of queue-5.10/libbpf-handle-size-overflow-for-ringbuf-mmap.patch --- diff --git a/queue-5.10/libbpf-handle-size-overflow-for-ringbuf-mmap.patch b/queue-5.10/libbpf-handle-size-overflow-for-ringbuf-mmap.patch index ca0d676ba65..19b2461e572 100644 --- a/queue-5.10/libbpf-handle-size-overflow-for-ringbuf-mmap.patch +++ b/queue-5.10/libbpf-handle-size-overflow-for-ringbuf-mmap.patch @@ -56,7 +56,7 @@ index 86c31c787fb9..141dbaf6e828 100644 + mmap_sz = rb->page_size + 2 * (__u64)info.max_entries; + if (mmap_sz != (__u64)(size_t)mmap_sz) { + pr_warn("ringbuf: ring buffer size (%u) is too big\n", info.max_entries); -+ return libbpf_err(-E2BIG); ++ return -E2BIG; + } + tmp = mmap(NULL, (size_t)mmap_sz, PROT_READ, MAP_SHARED, map_fd, rb->page_size); if (tmp == MAP_FAILED) {