* re: tracing: Add help of snapshot feature when snapshot is empty
@ 2014-06-20 17:40 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2014-06-20 17:40 UTC (permalink / raw)
To: kernel-janitors
Hello Steven Rostedt (Red Hat),
This is a semi-automatic email about new static checker warnings.
The patch d8741e2e88ac: "tracing: Add help of snapshot feature when
snapshot is empty" from Mar 5, 2013, leads to the following Smatch
complaint:
kernel/trace/trace.c:2933 s_show()
error: we previously assumed 'iter->tr' could be null (see line 2927)
kernel/trace/trace.c
2926 if (iter->ent = NULL) {
2927 if (iter->tr) {
^^^^^^^^
Existing check for "iter->tr".
2928 seq_printf(m, "# tracer: %s\n", iter->trace->name);
2929 seq_puts(m, "#\n");
2930 test_ftrace_alive(m);
2931 }
2932 if (iter->snapshot && trace_empty(iter))
2933 print_snapshot_help(m, iter);
^^^^^^^^^^^^^^^^^^^^^^^^^^^
"iter->tr" gets dereferenced inside the new call to print_snapshot_help().
2934 else if (iter->trace && iter->trace->print_header)
2935 iter->trace->print_header(m);
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-06-20 17:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-20 17:40 tracing: Add help of snapshot feature when snapshot is empty Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox