aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorMing Lei <[email protected]>2023-08-11 21:52:16 +0800
committerJens Axboe <[email protected]>2023-08-11 08:13:23 -0600
commite24721e441a7c640e4e7b2b63c23c06d9a750880 (patch)
tree5911a0eff83930b086aed0c8d0ba564dc4a2d9ff /lib/test_fortify/write_overflow-strncpy-src.c
parent18267a0365d6ec8bbe85ba8cbea5af12d9e59610 (diff)
ublk: fix 'warn: variable dereferenced before check 'req'' from Smatch
The added check of 'req_op(req) == REQ_OP_ZONE_APPEND' should have been done after the request is confirmed as valid. Actually here, the request should always been true, so add one WARN_ON_ONCE(!req), meantime move the zone_append check after checking the request. Cc: Andreas Hindborg <[email protected]> Reported-by: Dan Carpenter <[email protected]> Fixes: 29802d7ca33b ("ublk: enable zoned storage support") Signed-off-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions