diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-05 13:32:39 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-05 13:32:39 -0800 |
commit | ee9a7d2cb0cf1a1498478bc923d911f3d9c910ac (patch) | |
tree | ef1ccccfbab0dc7673cd9fbbea381f6b85e1b27c | |
parent | 3331f99a6f2957d14c2e4d542c287b2c5af9f22b (diff) | |
parent | f36d1be2930ede0a1947686e1126ffda5d5ee1bb (diff) |
Merge tag 'trace-v4.4-rc4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing fixes from Steven Rostedt:
"Two more fixes:
1. The recordmcount change had an output that used sprintf()
(incorrectly) when it should have been a fprintf() to stderr.
2. The printk_formats file could crash if someone added a
trace_printk() in the core kernel, and also added one in a module.
This does not affect production kernels. Only kernels where
developers add trace_printk() for debugging can crash"
* tag 'trace-v4.4-rc4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
tracing: Fix setting of start_index in find_next()
ftrace/scripts: Fix incorrect use of sprintf in recordmcount
-rw-r--r-- | kernel/trace/trace_printk.c | 1 | ||||
-rw-r--r-- | scripts/recordmcount.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/kernel/trace/trace_printk.c b/kernel/trace/trace_printk.c index 1c2b28536feb..060df67dbdd1 100644 --- a/kernel/trace/trace_printk.c +++ b/kernel/trace/trace_printk.c @@ -273,6 +273,7 @@ static const char **find_next(void *v, loff_t *pos) if (*pos < last_index + start_index) return __start___tracepoint_str + (*pos - last_index); + start_index += last_index; return find_next_mod_format(start_index, v, fmt, pos); } diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c index 301d70b0174f..e167592793a7 100644 --- a/scripts/recordmcount.c +++ b/scripts/recordmcount.c @@ -586,7 +586,7 @@ main(int argc, char *argv[]) do_file(file); break; case SJ_FAIL: /* error in do_file or below */ - sprintf("%s: failed\n", file); + fprintf(stderr, "%s: failed\n", file); ++n_error; break; case SJ_SUCCEED: /* premature success */ |