aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy.c
diff options
context:
space:
mode:
authorJohn Garry <[email protected]>2024-07-08 09:16:47 +0000
committerJens Axboe <[email protected]>2024-07-09 00:00:17 -0600
commit4ff3d01275dee10ed1f40c314ba5133e3c7a6e1b (patch)
tree763eee89e57308d6c7248720846d35c68941d315 /lib/test_fortify/write_overflow-strncpy.c
parent6b43537faef35eb3d2657e2a1ec668a31b5ba5d1 (diff)
virtio_blk: Fix default logical block size fallback
If we fail to read a logical block size in virtblk_read_limits() -> virtio_cread_feature(), then we default to what is in lim->logical_block_size, but that would be 0. We can deal with lim->logical_block_size = 0 later in the blk_mq_alloc_disk(), but the code in virtblk_read_limits() needs a proper default, so give a default of SECTOR_SIZE. Fixes: 27e32cd23fed ("block: pass a queue_limits argument to blk_mq_alloc_disk") Reviewed-by: Christoph Hellwig <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: John Garry <[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.c')
0 files changed, 0 insertions, 0 deletions