]> git.baikalelectronics.ru Git - kernel.git/commit
ring-buffer: check for less than two in size allocation
authorSteven Rostedt <srostedt@redhat.com>
Wed, 17 Jun 2009 18:11:10 +0000 (14:11 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 17 Jun 2009 18:16:20 +0000 (14:16 -0400)
commitf66800c5c6b2a3a8bd3217557198bd8311e2d5ec
tree8c5a5f11caadc1cb662152fb1ef84b5b1fa19bbb
parent39dc3dc50e39186bbea02866e4c80a3a4c18b8e5
ring-buffer: check for less than two in size allocation

The ring buffer must have at least two pages allocated for the
reader page swap to work.

The page count check will miss the case of a zero size passed in.
Even though a zero size ring buffer would probably fail an allocation,
making the min size check for less than two instead of equal to one makes
the code a bit more robust.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/ring_buffer.c