diff options
author | Ingo Molnar <mingo@kernel.org> | 2019-02-11 08:01:50 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-02-11 08:01:50 +0100 |
commit | c9ba7560c550fe6c1f4a8f0666bea41d2a349d1d (patch) | |
tree | b15d53e69f73b160b4625e91187cd436c5a3e683 /kernel/events/ring_buffer.c | |
parent | sched/fair: Fix insertion in rq->leaf_cfs_rq_list (diff) | |
parent | Linux 5.0-rc6 (diff) | |
download | linux-c9ba7560c550fe6c1f4a8f0666bea41d2a349d1d.tar.xz linux-c9ba7560c550fe6c1f4a8f0666bea41d2a349d1d.zip |
Merge tag 'v5.0-rc6' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/events/ring_buffer.c')
-rw-r--r-- | kernel/events/ring_buffer.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c index 4a9937076331..309ef5a64af5 100644 --- a/kernel/events/ring_buffer.c +++ b/kernel/events/ring_buffer.c @@ -734,6 +734,9 @@ struct ring_buffer *rb_alloc(int nr_pages, long watermark, int cpu, int flags) size = sizeof(struct ring_buffer); size += nr_pages * sizeof(void *); + if (order_base_2(size) >= MAX_ORDER) + goto fail; + rb = kzalloc(size, GFP_KERNEL); if (!rb) goto fail; |