]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace: Check for successful allocation of hash
authorNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Thu, 4 Jul 2019 14:34:42 +0000 (20:04 +0530)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 30 Aug 2019 20:49:07 +0000 (16:49 -0400)
commit34eef7406300f67f52511695a43174c58d7b03b5
treeb7e6fca3afb0ed19eaa69acb4115f62b41913f82
parent0348d6a73acc8a56e4f8d2d544c2490a884bf974
ftrace: Check for successful allocation of hash

In register_ftrace_function_probe(), we are not checking the return
value of alloc_and_copy_ftrace_hash(). The subsequent call to
ftrace_match_records() may end up dereferencing the same. Add a check to
ensure this doesn't happen.

Link: http://lkml.kernel.org/r/26e92574f25ad23e7cafa3cf5f7a819de1832cbe.1562249521.git.naveen.n.rao@linux.vnet.ibm.com
Cc: stable@vger.kernel.org
Fixes: d210aa5382c4f ("ftrace: Have each function probe use its own ftrace_ops")
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/ftrace.c