aboutsummaryrefslogtreecommitdiff
path: root/include/usbroothubdes.h
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2020-08-19 18:07:32 +0900
committerTom Rini <trini@konsulko.com>2020-08-24 14:11:31 -0400
commit6b0ddd1fbc6c8f7cbd0418e8a87d02404ad3dd9b (patch)
tree3665c3ed50e091314f49216994a5d852a59bb924 /include/usbroothubdes.h
parent91f6c1ca2e4400f30b5faee04f1dd9001abd326f (diff)
downloadu-boot-6b0ddd1fbc6c8f7cbd0418e8a87d02404ad3dd9b.zip
u-boot-6b0ddd1fbc6c8f7cbd0418e8a87d02404ad3dd9b.tar.gz
u-boot-6b0ddd1fbc6c8f7cbd0418e8a87d02404ad3dd9b.tar.bz2
virtio_blk: set log2blksz correctly
'log2blksz' in blk_desc structure must always be initialized, otherwise it will cause a lot of weird failures in file operations. For example, fs_set_blk_dev[_with_part]() examines a block device against every file system with its probe function. In particular, ext4 file system's ext4_probe() will calls fs_devread() to fetch a super block. If log2blksz is 0, the actual 'read' size, i.e. block_len >> log2blksz, is much bigger than a buffer's size, and it can end up with memory corruption. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Fixes: f4802209e59d ("virtio: Add block driver support") Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include/usbroothubdes.h')
0 files changed, 0 insertions, 0 deletions