Message ID | 20200703063420.2241014-16-its@irrelevant.dk |
---|---|
State | New |
Headers | show |
Series | hw/block/nvme: bump to v1.3 | expand |
diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 65c2fa3ac1f4..0dac7a41ddae 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -956,6 +956,10 @@ static uint16_t nvme_identify_nslist(NvmeCtrl *n, NvmeIdentify *c) trace_pci_nvme_identify_nslist(min_nsid); + if (min_nsid == 0xfffffffe || min_nsid == NVME_NSID_BROADCAST) { + return NVME_INVALID_NSID | NVME_DNR; + } + list = g_malloc0(data_len); for (i = 0; i < n->num_namespaces; i++) { if (i < min_nsid) {