From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: tracing: Add 'hist' event trigger command
Date: Fri, 22 Apr 2016 09:54:23 +0000 [thread overview]
Message-ID: <20160422095423.GA11398@mwanda> (raw)
Hello Tom Zanussi,
This is a semi-automatic email about new static checker warnings.
The patch 7ef224d1d0e3: "tracing: Add 'hist' event trigger command"
from Mar 3, 2016, leads to the following Smatch complaint:
kernel/trace/trace_events_hist.c:374 create_hist_field()
error: we previously assumed 'field' could be null (see line 352)
kernel/trace/trace_events_hist.c
351
352 if (field && is_function_field(field))
^^^^^
New check for NULL.
353 return NULL;
354
355 hist_field = kzalloc(sizeof(struct hist_field), GFP_KERNEL);
356 if (!hist_field)
357 return NULL;
358
359 if (flags & HIST_FIELD_FL_HITCOUNT) {
360 hist_field->fn = hist_field_counter;
361 goto out;
362 }
363
364 if (flags & HIST_FIELD_FL_STACKTRACE) {
365 hist_field->fn = hist_field_none;
366 goto out;
367 }
368
369 if (flags & HIST_FIELD_FL_LOG2) {
370 hist_field->fn = hist_field_log2;
371 goto out;
372 }
373
374 if (is_string_field(field)) {
^^^^^
New unchecked dereference inside function.
375 flags |= HIST_FIELD_FL_STRING;
376
regards,
dan carpenter
next reply other threads:[~2016-04-22 9:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-22 9:54 Dan Carpenter [this message]
2016-04-22 15:14 ` tracing: Add 'hist' event trigger command Tom Zanussi
2016-04-22 15:34 ` Steven Rostedt
2016-04-23 10:28 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160422095423.GA11398@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox