[SeaBIOS] [SEABIOS] [PATCH 1/1] nvme: fix I/O queue length calculation overflow

Kevin O'Connor kevin at koconnor.net
Thu Aug 23 16:24:34 CEST 2018


On Tue, Aug 21, 2018 at 10:21:56AM -0500, Matt DeVillier wrote:
> From 2741d96d07855c3bc904d6ce47c82391039bca87 Mon Sep 17 00:00:00 2001
> From: Matt DeVillier <matt.devillier at puri.sm>
> Date: Tues, 21 Aug 2018 10:00:53 -0500
> Subject: [PATCH v2 1/1] nvme: fix I/O queue length calculation overflow
> 
> Commit cd47172 changed the I/O queue length calculation to use the
> Maximum Queue Entries Supported (MQES) value from the capabilities
> register, plus one, with a maximum value of NVME_PAGE_SIZE.
> 
> An unintended effect from this is that due to length being an unsigned
> 16-bit int, a MQES value of 0xFFFF yields a length of zero, resulting
> in the queue allocation failing. Fix this by changing length to a u32.

Thanks.  I committed this change.

-Kevin



More information about the SeaBIOS mailing list