[PATCH] nvme-core: check for too small lba shift
Jens Axboe
axboe at kernel.dk
Tue Nov 28 11:10:29 PST 2023
On 11/28/23 10:39 AM, Keith Busch wrote:
> From: Keith Busch <kbusch at kernel.org>
>
> The block layer doesn't support logical block sizes smaller than 512
> bytes. The nvme spec doesn't support that small either, but the driver
> isn't checking to make sure the device responded with usable data.
> Failing to catch this will result in a kernel bug, either from a
> division by zero when stacking, or a zero length bio.
Reviewed-by: Jens Axboe <axboe at kernel.dk>
--
Jens Axboe
More information about the Linux-nvme
mailing list