tracing: Adding NULL checks for trace_array descriptor pointer
authorDivya Indi <divya.indi@oracle.com>
Wed, 14 Aug 2019 17:55:25 +0000 (10:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2020 18:40:03 +0000 (20:40 +0200)
commit6f46c4f131d23349cf10594248c4fba560d8be86
tree9150365e81415987a561fa486c5c03d0836e5c67
parent8dec3131a8e52a874a80814350e425ba69fd7ab6
tracing: Adding NULL checks for trace_array descriptor pointer

[ Upstream commit 953ae45a0c25e09428d4a03d7654f97ab8a36647 ]

As part of commit f45d1225adb0 ("tracing: Kernel access to Ftrace
instances") we exported certain functions. Here, we are adding some additional
NULL checks to ensure safe usage by users of these APIs.

Link: http://lkml.kernel.org/r/1565805327-579-4-git-send-email-divya.indi@oracle.com
Signed-off-by: Divya Indi <divya.indi@oracle.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/trace/trace.c
kernel/trace/trace_events.c