aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/kernel/trace/trace_functions.c
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2017-08-14 13:14:36 -0400
committerSean Paul <seanpaul@chromium.org>2017-08-14 13:14:36 -0400
commit1724c7c0c9494dcbdd7f630f29e1e8427cb231d1 (patch)
treed7c7ad032289cdf0633feee4bd6ec5800b666ca7 /kernel/trace/trace_functions.c
parentdrm/atomic: Handle -EDEADLK with out-fences correctly (diff)
parentLinux 4.13-rc5 (diff)
downloadwireguard-linux-1724c7c0c9494dcbdd7f630f29e1e8427cb231d1.tar.xz
wireguard-linux-1724c7c0c9494dcbdd7f630f29e1e8427cb231d1.zip
Merge origin/master into drm-misc-fixes
Backmerge 4.13-rc5 into drm-misc-fixes, it was getting a little stale. Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'kernel/trace/trace_functions.c')
-rw-r--r--kernel/trace/trace_functions.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c
index a3bddbfd0874..a0910c0cdf2e 100644
--- a/kernel/trace/trace_functions.c
+++ b/kernel/trace/trace_functions.c
@@ -654,6 +654,9 @@ ftrace_trace_onoff_callback(struct trace_array *tr, struct ftrace_hash *hash,
{
struct ftrace_probe_ops *ops;
+ if (!tr)
+ return -ENODEV;
+
/* we register both traceon and traceoff to this callback */
if (strcmp(cmd, "traceon") == 0)
ops = param ? &traceon_count_probe_ops : &traceon_probe_ops;
@@ -670,6 +673,9 @@ ftrace_stacktrace_callback(struct trace_array *tr, struct ftrace_hash *hash,
{
struct ftrace_probe_ops *ops;
+ if (!tr)
+ return -ENODEV;
+
ops = param ? &stacktrace_count_probe_ops : &stacktrace_probe_ops;
return ftrace_trace_probe_callback(tr, ops, hash, glob, cmd,
@@ -682,6 +688,9 @@ ftrace_dump_callback(struct trace_array *tr, struct ftrace_hash *hash,
{
struct ftrace_probe_ops *ops;
+ if (!tr)
+ return -ENODEV;
+
ops = &dump_probe_ops;
/* Only dump once. */
@@ -695,6 +704,9 @@ ftrace_cpudump_callback(struct trace_array *tr, struct ftrace_hash *hash,
{
struct ftrace_probe_ops *ops;
+ if (!tr)
+ return -ENODEV;
+
ops = &cpudump_probe_ops;
/* Only dump once. */