]> www.infradead.org Git - qemu-nvme.git/commit
hw/block/nvme: fix log page offset check
authorKeith Busch <kbusch@kernel.org>
Wed, 30 Sep 2020 17:01:02 +0000 (10:01 -0700)
committerKeith Busch <kbusch@kernel.org>
Wed, 30 Sep 2020 20:11:25 +0000 (13:11 -0700)
commit6e18b5d9f4a599e94cf50b4af000f2b7898d7685
tree3a1911419924c9ee2e06d3299703ea5697174cba
parentb26e1cad5f8a7f4f0dc48afe1774125c6fedaf68
hw/block/nvme: fix log page offset check

Return error if the requested offset starts after the size of the log
being returned. Also, move the check for earlier in the function so
we're not doing unnecessary calculations.

Signed-off-by: Keith Busch <kbusch@kernel.org>
hw/block/nvme.c