Commit e4ef389e authored by Steven Rostedt's avatar Steven Rostedt Committed by Steven Rostedt (Google)
Browse files

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/20220917020353.3836285-1-floridsleeves@gmail.com/

Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://patch.msgid.link/20260107161510.4dc98b15@gandalf.local.home


Suggested-by: default avatarLi Zhong <floridsleeves@gmail.com>
Acked-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
parent 6a808388
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -3309,8 +3309,9 @@ void trace_printk_init_buffers(void)
	pr_warn("**********************************************************\n");

	/* Expand the buffers to set size */
	tracing_update_buffers(&global_trace);

	if (tracing_update_buffers(&global_trace) < 0)
		pr_err("Failed to expand tracing buffers for trace_printk() calls\n");
	else
		buffers_allocated = 1;

	/*