diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/ring_buffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 162da2305cbc..2e99dba6dc48 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
@@ -657,8 +657,8 @@ struct ring_buffer *__ring_buffer_alloc(unsigned long size, unsigned flags, | |||
657 | buffer->reader_lock_key = key; | 657 | buffer->reader_lock_key = key; |
658 | 658 | ||
659 | /* need at least two pages */ | 659 | /* need at least two pages */ |
660 | if (buffer->pages == 1) | 660 | if (buffer->pages < 2) |
661 | buffer->pages++; | 661 | buffer->pages = 2; |
662 | 662 | ||
663 | /* | 663 | /* |
664 | * In case of non-hotplug cpu, if the ring-buffer is allocated | 664 | * In case of non-hotplug cpu, if the ring-buffer is allocated |