Page MenuHomeFreeBSD

D33575.id100304.diff
No OneTemporary

D33575.id100304.diff

Index: usr.sbin/bhyve/pci_nvme.c
===================================================================
--- usr.sbin/bhyve/pci_nvme.c
+++ usr.sbin/bhyve/pci_nvme.c
@@ -2164,7 +2164,7 @@
bytes = nlb << nvstore->sectsz_bits;
/* Overflow check of Number of Logical Blocks */
- if ((nvstore->size - offset) < bytes)
+ if ((nvstore->size - offset) <= bytes)
return (true);
return (false);
@@ -2473,7 +2473,8 @@
nblocks = (cmd->cdw12 & 0xFFFF) + 1;
if (pci_nvme_out_of_range(nvstore, lba, nblocks)) {
- WPRINTF("%s command would exceed LBA range", __func__);
+ WPRINTF("%s command would exceed LBA range(slba=%#lx nlb=%#lx)",
+ __func__, lba, nblocks);
pci_nvme_status_genc(status, NVME_SC_LBA_OUT_OF_RANGE);
goto out;
}

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 16, 4:11 AM (7 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31577660
Default Alt Text
D33575.id100304.diff (746 B)

Event Timeline