Skip to contentSkip to conversation

NVMe: Set result from user admin command

PATCH New Keith Busch 2 participants 2 messages Sep 21, 2012 – Nov 6, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NVMe: Set result from user admin command

Signed-off-by Keith Busch <keith.busch at intel.com>
---
 drivers/block/nvme.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
drivers/block/nvme.c +6 -1
index f9ad514..c64ef67 100644
@@ -1235,12 +1235,17 @@ static int nvme_user_admin_cmd(struct nvme_dev *dev,
 	if (length != cmd.data_len)
 		status = -ENOMEM;
 	else
-		status = nvme_submit_admin_cmd(dev, &c, NULL);
+		status = nvme_submit_admin_cmd(dev, &c, &cmd.result);
 
 	if (cmd.data_len) {
 		nvme_unmap_user_pages(dev, cmd.opcode & 1, iod);
 		nvme_free_iod(dev, iod);
 	}
+
+	if (!status && copy_to_user(&ucmd->result, &cmd.result,
+							sizeof(cmd.result)))
+		status = -EFAULT;
+
 	return status;
 }
 
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 NVMe: Set result from user admin command

Quoted 1 line · Keith Busch
Signed-off-by Keith Busch <keith.busch at intel.com>

Thanks, applied. Wrote another changelog :-)