summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKlaus Jensen2021-03-09 15:11:42 +0100
committerKlaus Jensen2021-03-18 12:34:51 +0100
commit3754df04ec291b933c18285210793d02c9d9787a (patch)
tree45125cda78ec8cea50f6f26729fea213c134d7fb /configure
parenthw/block/nvme: assert namespaces array indices (diff)
downloadqemu-3754df04ec291b933c18285210793d02c9d9787a.tar.gz
qemu-3754df04ec291b933c18285210793d02c9d9787a.tar.xz
qemu-3754df04ec291b933c18285210793d02c9d9787a.zip
hw/block/nvme: fix zone management receive reporting too many zones
nvme_zone_mgmt_recv uses nvme_ns_nlbas() to get the number of LBAs in the namespace and then calculates the number of zones to report by incrementing slba with ZSZE until exceeding the number of LBAs as returned by nvme_ns_nlbas(). This is bad because the namespace might be of such as size that some LBAs are valid, but are not part of any zone, causing zone management receive to report one additional (but non-existing) zone. Fix this with a conventional loop on i < ns->num_zones instead. Fixes: a479335bfaf3 ("hw/block/nvme: Support Zoned Namespace Command Set") Cc: Dmitry Fomichev <dmitry.fomichev@wdc.com> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Diffstat (limited to 'configure')
0 files changed, 0 insertions, 0 deletions