From 9a43cbd4902fec067d308343f171c75b4a733ac7 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Wed, 14 Mar 2018 17:29:23 -0700 Subject: [PATCH] nvmf: mask off reserved bits in AER configuration Set Features - Asynchronous Event Configuration has reserved bits in the CDW11 value, which we shouldn't allow the host to set. Explicitly set them to 0 in the Set Features handler to avoid propagating them to the Get Features return value. Change-Id: I73ed87d6d310e585c073b1db3b875147b4727007 Signed-off-by: Daniel Verkamp Reviewed-on: https://review.gerrithub.io/403902 Tested-by: SPDK Automated Test System Reviewed-by: Paul Luse Reviewed-by: Changpeng Liu Reviewed-by: Jim Harris --- lib/nvmf/ctrlr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/nvmf/ctrlr.c b/lib/nvmf/ctrlr.c index af1cc723f..79509ced4 100644 --- a/lib/nvmf/ctrlr.c +++ b/lib/nvmf/ctrlr.c @@ -771,6 +771,7 @@ spdk_nvmf_ctrlr_set_features_async_event_configuration(struct spdk_nvmf_request SPDK_DEBUGLOG(SPDK_LOG_NVMF, "Set Features - Async Event Configuration, cdw11 0x%08x\n", cmd->cdw11); ctrlr->feat.async_event_configuration.raw = cmd->cdw11; + ctrlr->feat.async_event_configuration.bits.reserved = 0; return SPDK_NVMF_REQUEST_EXEC_STATUS_COMPLETE; }