Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152470567
D33575.id100304.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
746 B
Referenced Files
None
Subscribers
None
D33575.id100304.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D33575: bhyve nvme: Fix LBA out-of-range calculation
Attached
Detach File
Event Timeline
Log In to Comment