diff options
| author | Johannes Thumshirn <johannes.thumshirn@wdc.com> | 2026-02-03 12:35:28 +0100 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-02-03 07:15:31 -0700 |
| commit | ee4784a83fb21a2d16ebfdf8877fa6f6a1129150 (patch) | |
| tree | c30463937a6a2da4c1c908a3a0aa847417861016 /include | |
| parent | 65d466b6298470ce21ab21ebfdb51309d515737d (diff) | |
block: don't use strcpy to copy blockdev name
0-day bot flagged the use of strcpy() in blk_trace_setup(), because the
source buffer can theoretically be bigger than the destination buffer.
While none of the current callers pass a string bigger than
BLKTRACE_BDEV_SIZE, use strscpy() to prevent eventual future misuse and
silence the checker warnings.
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202602020718.GUEIRyG9-lkp@intel.com/
Fixes: 113cbd62824a ("blktrace: pass blk_user_trace2 to setup functions")
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
