Page MenuHomeFreeBSD

D61559.1794767820.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D61559.1794767820.diff

diff --git a/sys/dev/nvmf/controller/nvmft_controller.c b/sys/dev/nvmf/controller/nvmft_controller.c
--- a/sys/dev/nvmf/controller/nvmft_controller.c
+++ b/sys/dev/nvmf/controller/nvmft_controller.c
@@ -815,6 +815,9 @@
struct nvme_completion cqe;
uint8_t fid;
+ if (NVMEV(NVME_FEAT_SET_SV, le32toh(cmd->cdw10)) != 0)
+ goto error;
+
fid = NVMEV(NVME_FEAT_SET_FID, le32toh(cmd->cdw10));
switch (fid) {
case NVME_FEAT_NUMBER_OF_QUEUES:
@@ -822,6 +825,9 @@
uint32_t num_queues;
struct nvmft_io_qpair *io_qpairs;
+ if (cmd->nsid != htole32(0))
+ goto not_ns_specifc;
+
num_queues = le32toh(cmd->cdw11) & 0xffff;
/* 5.12.1.7: 65535 is invalid. */
@@ -862,6 +868,9 @@
{
uint32_t aer_mask;
+ if (cmd->nsid != htole32(0))
+ goto not_ns_specifc;
+
aer_mask = le32toh(cmd->cdw11);
/* Check for any reserved or unimplemented feature bits. */
@@ -884,6 +893,13 @@
error:
nvmft_send_generic_error(ctrlr->admin, nc, NVME_SC_INVALID_FIELD);
nvmf_free_capsule(nc);
+ return;
+
+not_ns_specifc:
+ nvmft_send_error(ctrlr->admin, nc, NVME_SCT_COMMAND_SPECIFIC,
+ NVME_SC_FEATURE_NOT_NS_SPECIFIC);
+ nvmf_free_capsule(nc);
+ return;
}
static bool

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 15, 6:37 PM (23 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41746171
Default Alt Text
D61559.1794767820.diff (1 KB)

Event Timeline