Commit d008ba8
tracing: Fix trace_buf_size= cmdline parameter with sizes >= 2G
Some of the sizing logic through tracer_alloc_buffers() uses int
internally, causing unexpected behavior if the user passes a value that
does not fit in an int (on my x86 machine, the result is uselessly tiny
buffers).
Fix by plumbing the parameter's real type (unsigned long) through to the
ring buffer allocation functions, which already use unsigned long.
It has always been possible to create larger ring buffers via the sysfs
interface: this only affects the cmdline parameter.
Cc: stable@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://patch.msgid.link/bff42a4288aada08bdf74da3f5b67a2c28b761f8.1772852067.git.calvin@wbinvd.org
Fixes: 73c5162 ("tracing: keep ring buffer to minimum size till used")
Signed-off-by: Calvin Owens <calvin@wbinvd.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>1 parent 3b1679e commit d008ba8
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9350 | 9350 | | |
9351 | 9351 | | |
9352 | 9352 | | |
9353 | | - | |
| 9353 | + | |
9354 | 9354 | | |
9355 | 9355 | | |
9356 | 9356 | | |
| |||
9405 | 9405 | | |
9406 | 9406 | | |
9407 | 9407 | | |
9408 | | - | |
| 9408 | + | |
9409 | 9409 | | |
9410 | 9410 | | |
9411 | 9411 | | |
| |||
10769 | 10769 | | |
10770 | 10770 | | |
10771 | 10771 | | |
10772 | | - | |
| 10772 | + | |
10773 | 10773 | | |
10774 | 10774 | | |
10775 | 10775 | | |
| |||
0 commit comments