|
@@ -374,6 +374,8 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)
|
|
|
|
|
|
if (copy_from_user(&io, uio, sizeof(io)))
|
|
|
return -EFAULT;
|
|
|
+ if (io.flags)
|
|
|
+ return -EINVAL;
|
|
|
|
|
|
switch (io.opcode) {
|
|
|
case nvme_cmd_write:
|
|
@@ -425,6 +427,8 @@ static int nvme_user_cmd(struct nvme_ctrl *ctrl, struct nvme_ns *ns,
|
|
|
return -EACCES;
|
|
|
if (copy_from_user(&cmd, ucmd, sizeof(cmd)))
|
|
|
return -EFAULT;
|
|
|
+ if (cmd.flags)
|
|
|
+ return -EINVAL;
|
|
|
|
|
|
memset(&c, 0, sizeof(c));
|
|
|
c.common.opcode = cmd.opcode;
|