re: tracing: Add help of snapshot feature when snapshot is empty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux