diff options
author | Arnd Bergmann <[email protected]> | 2024-04-09 16:00:57 +0200 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2024-04-25 21:07:08 -0700 |
commit | 051e7503070179f2278c0d4fa7dee441adb558ca (patch) | |
tree | 7cea9d9163f5a870eb613ab55de613dcecd213f2 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 597bc741e5ac2608e3ec0afd4256163879ab506b (diff) |
blktrace: convert strncpy() to strscpy_pad()
gcc-9 warns about a possibly non-terminated string copy:
kernel/trace/blktrace.c: In function 'do_blk_trace_setup':
kernel/trace/blktrace.c:527:2: error: 'strncpy' specified bound 32 equals destination size [-Werror=stringop-truncation]
Newer versions are fine here because they see the following explicit
nul-termination. Using strscpy_pad() avoids the warning and
simplifies the code a little. The padding helps give a clean
buffer to userspace.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnd Bergmann <[email protected]>
Acked-by: Justin Stitt <[email protected]>
Cc: Alexey Starikovskiy <[email protected]>
Cc: Bob Moore <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Len Brown <[email protected]>
Cc: Lin Ming <[email protected]>
Cc: Masahiro Yamada <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: Nathan Chancellor <[email protected]>
Cc: Nicolas Schier <[email protected]>
Cc: Rafael J. Wysocki <[email protected]>
Cc: "Richard Russon (FlatCap)" <[email protected]>
Cc: Steven Rostedt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions