Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1575351
| From | Masami Hiramatsu <mhiramat@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH tip/master] tracing/probes: Fix a warning message to show correct maximum length |
| Date | 2017-02-07 04:20 +0100 |
| Message-ID | <t84tY-5Bi-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Since tracing/*probe_events will accept a probe definition
up to 4096 - 2 ('\n' and '\0') bytes, it must show 4094 instead
of 4096 in warning message.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
kernel/trace/trace_probe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c
index 8c0553d..7138fea 100644
--- a/kernel/trace/trace_probe.c
+++ b/kernel/trace/trace_probe.c
@@ -673,8 +673,9 @@ ssize_t traceprobe_probes_write(struct file *file, const char __user *buffer,
*tmp = '\0';
size = tmp - kbuf + 1;
} else if (done + size < count) {
+ /* This can accept WRITE_BUFSIZE - 2 ('\n' + '\0') */
pr_warn("Line length is too long: Should be less than %d\n",
- WRITE_BUFSIZE);
+ WRITE_BUFSIZE - 2);
ret = -EINVAL;
goto out;
}
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH tip/master] tracing/probes: Fix a warning message to show correct maximum length Masami Hiramatsu <mhiramat@kernel.org> - 2017-02-07 04:20 +0100
Re: [PATCH tip/master] tracing/probes: Fix a warning message to show correct maximum length Ingo Molnar <mingo@kernel.org> - 2017-02-07 08:50 +0100
Re: [PATCH tip/master] tracing/probes: Fix a warning message to show correct maximum length Masami Hiramatsu <mhiramat@kernel.org> - 2017-02-07 12:10 +0100
[PATCH tip/master] tracing/probe: Show subsystem name in messages Masami Hiramatsu <mhiramat@kernel.org> - 2017-02-07 12:30 +0100
csiph-web