mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-09-26 18:16:26 +00:00
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>
This commit is contained in:
parent
0dcd4d6c3e
commit
5f78abeebb
1 changed files with 2 additions and 2 deletions
Loading…
Add table
Add a link
Reference in a new issue