]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fix up backport of queue-5.10/libbpf-handle-size-overflow-for-ringbuf-mmap.patch
authorSasha Levin <sashal@kernel.org>
Mon, 5 Dec 2022 06:24:15 +0000 (01:24 -0500)
committerSasha Levin <sashal@kernel.org>
Mon, 5 Dec 2022 12:26:17 +0000 (07:26 -0500)
queue-5.10/libbpf-handle-size-overflow-for-ringbuf-mmap.patch

index ca0d676ba659bb9780d0d3f6f2ae59852c03768c..19b2461e572e8dc7f7489d85cb444bd9d3de4b24 100644 (file)
@@ -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) {