Re: [PATCH 02/10] block: virtio-blk: check logical block size
From: Stefan Hajnoczi
Date: Tue Jul 28 2020 - 11:45:16 EST
On Tue, Jul 21, 2020 at 01:52:31PM +0300, Maxim Levitsky wrote:
> Linux kernel only supports logical block sizes which are power of two,
> at least 512 bytes and no more that PAGE_SIZE.
> Check this instead of crashing later on.
> Note that there is no need to check physical block size since it is
> only a hint, and virtio-blk already only supports power of two values.
> Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1664619
> Signed-off-by: Maxim Levitsky <mlevitsk@xxxxxxxxxx>
> drivers/block/virtio_blk.c | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@xxxxxxxxxx>
Description: PGP signature