]> Git Repo - qemu.git/commit
trace: handle tracefs path truncation
authorStefan Hajnoczi <[email protected]>
Thu, 21 Mar 2019 17:08:30 +0000 (17:08 +0000)
committerStefan Hajnoczi <[email protected]>
Fri, 22 Mar 2019 15:55:50 +0000 (15:55 +0000)
commitfd9858317a3d06c94ad8c1c420e6b5c376f5a92e
treec87f18f18631f5c5bdcd999cda694e9458dc74e1
parentd97a39d903fe33c45be83ac6943a2f82a3649a11
trace: handle tracefs path truncation

If the tracefs mountpoint has a very long path we may exceed PATH_MAX.
This is a system misconfiguration and the user must resolve it so that
applications can perform path-based system calls successfully.

This issue does not occur on real-world systems since tracefs is mounted
on /sys/kernel/debug/tracing/, but the compiler is smart enough to
foresee the possibility and warn about the unchecked snprintf(3) return
value.  This patch fixes the compiler warning.

Reported-by: Markus Armbruster <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Reviewed-by: Liam Merwick <[email protected]>
Message-id: 20190321170831[email protected]
Message-Id: <20190321170831[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
trace/ftrace.c
This page took 0.026516 seconds and 4 git commands to generate.