]> git.baikalelectronics.ru Git - kernel.git/commit
kyber: fix wrong strlcpy() size in trace_kyber_latency()
authorOmar Sandoval <osandov@fb.com>
Mon, 12 Nov 2018 08:08:46 +0000 (00:08 -0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 12 Nov 2018 15:28:37 +0000 (08:28 -0700)
commit9e269b6d502eff89516ff23a657d0b2834212213
tree08a29ea40815efa2d7504cb12f89cec1ec77cf54
parent2eb99d243917511ffd06f1f6e10a002953a81d80
kyber: fix wrong strlcpy() size in trace_kyber_latency()

When copying to the latency type, we should be passing LATENCY_TYPE_LEN,
not DOMAIN_LEN (this isn't a problem in practice because we only pass
"total" or "I/O"). Fix it by changing all of the strlcpy() calls to use
sizeof().

Fixes: f46ee4a1c670 ("kyber: add tracepoints")
Reported-by: Jordan Glover <Golden_Miller83@protonmail.ch>
Tested-by: Jordan Glover <Golden_Miller83@protonmail.ch>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/trace/events/kyber.h