diff options
| author | Borislav Petkov <[email protected]> | 2018-10-30 15:07:17 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2018-10-31 08:54:14 -0700 |
| commit | b49dec1cf8ff1e0b204dd2c30b95a92d75591146 (patch) | |
| tree | 37133aa2c8be76f3c2ca6552689cfe7f47b64f3e /tools/perf/scripts/python/net_dropmonitor.py | |
| parent | 95c4fb78fb23081472465ca20d5d31c4b780ed82 (diff) | |
kernel/panic.c: filter out a potential trailing newline
If a call to panic() terminates the string with a \n , the result puts the
closing brace ']---' on a newline because panic() itself adds \n too.
Now, if one goes and removes the newline chars from all panic()
invocations - and the stats right now look like this:
~300 calls with a \n
~500 calls without a \n
one is destined to a neverending game of whack-a-mole because the usual
thing to do is add a newline at the end of a string a function is supposed
to print.
Therefore, simply zap any \n at the end of the panic string to avoid
touching so many places in the kernel.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Borislav Petkov <[email protected]>
Acked-by: Kees Cook <[email protected]>
Reviewed-by: Steven Rostedt (VMware) <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions