mirror of
https://github.com/torvalds/linux.git
synced 2026-11-23 23:11:40 +00:00
tracing: Check the return value of tracing_update_buffers()
In the very unlikely event that tracing_update_buffers() fails in trace_printk_init_buffers(), report the failure so that it is known. Link: https://lore.kernel.org/all/[email protected]/ Cc: Mathieu Desnoyers <[email protected]> Link: https://patch.msgid.link/[email protected] Suggested-by: Li Zhong <[email protected]> Acked-by: Masami Hiramatsu (Google) <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
This commit is contained in:
committed by
Steven Rostedt (Google)
parent
6a80838814
commit
e4ef389e76
@@ -3309,9 +3309,10 @@ void trace_printk_init_buffers(void)
|
||||
pr_warn("**********************************************************\n");
|
||||
|
||||
/* Expand the buffers to set size */
|
||||
tracing_update_buffers(&global_trace);
|
||||
|
||||
buffers_allocated = 1;
|
||||
if (tracing_update_buffers(&global_trace) < 0)
|
||||
pr_err("Failed to expand tracing buffers for trace_printk() calls\n");
|
||||
else
|
||||
buffers_allocated = 1;
|
||||
|
||||
/*
|
||||
* trace_printk_init_buffers() can be called by modules.
|
||||
|
||||
Reference in New Issue
Block a user