Messages in this thread | | | Subject | Re: New Defect(s) reported by Coverity Scan | From | Steven Rostedt <> | Date | Mon, 08 Apr 2013 14:33:02 -0400 |
| |
Removed other's Cc'd.
On Mon, 2013-04-01 at 22:34 +0000, Scan Subscription wrote:
> http://scan5.coverity.com:8080/sourcebrowser.htm?projectId=10063#mergedDefectId=102438 > > /kernel/trace/trace.c: 2431 ( var_compare_op) > 2428 int ret; > 2429 > 2430 if (iter->ent == NULL) { > >>> Comparing "iter->tr" to null implies that "iter->tr" might be null. > 2431 if (iter->tr) {
The only bug here is the unnecessary check of iter->tr. It will never be NULL here. I'll fix this when I get around to it, but it is really low on the priority list.
-- Steve
> 2432 seq_printf(m, "# tracer: %s\n", iter->trace->name); > 2433 seq_puts(m, "#\n"); > 2434 test_ftrace_alive(m); > 2435 } > >>> CID 102438: Dereference after null check (FORWARD_NULL) Passing > >>> "iter" to function "trace_empty(struct trace_iterator *)", which dereferences null "iter->tr". > 2436 if (iter->snapshot && trace_empty(iter)) > 2437 print_snapshot_help(m, iter); > 2438 else if (iter->trace && iter->trace->print_header) > 2439 iter->trace->print_header(m); > 2440 else >
| |