Files
linux/kernel
Kamal Agrawal 0671bafa24 UPSTREAM: tracing: Fix NULL pointer dereference in start_creating
The event_trace_add_tracer() can fail. In this case, it leads to a crash
in start_creating with below call stack. Handle the error scenario
properly in trace_array_create_dir.

Call trace:
down_write+0x7c/0x204
start_creating.25017+0x6c/0x194
tracefs_create_file+0xc4/0x2b4
init_tracer_tracefs+0x5c/0x940
trace_array_create_dir+0x58/0xb4
trace_array_create+0x1bc/0x2b8
trace_array_get_by_name+0xdc/0x18c

Link: https://lkml.kernel.org/r/1627651386-21315-1-git-send-email-kamaagra@codeaurora.org

Cc: stable@vger.kernel.org
Fixes: 4114fbfd02 ("tracing: Enable creating new instance early boot")
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

Bug: 200485226
Change-Id: I79946d9bfc3ffd129bbb1e5fa6460ec0a51f8e59
(cherry picked from commit ff41c28c4b)
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
2021-09-20 19:02:31 +05:30
..
2021-05-13 14:22:11 +02:00
2021-04-14 08:41:58 +02:00
2021-05-27 08:36:46 +02:00
2020-08-26 09:10:39 -04:00
2021-05-13 14:22:11 +02:00
2020-08-12 10:58:02 -07:00
2020-11-14 11:26:04 -08:00
2021-01-13 10:28:55 +01:00
2020-07-27 14:31:12 -04:00
2021-06-03 18:47:38 +02:00
2021-02-07 15:37:17 +01:00
2019-12-18 18:07:31 +01:00
2020-05-09 13:57:12 +02:00
2021-05-20 15:35:25 +02:00
2021-04-15 14:23:41 +02:00