summaryrefslogtreecommitdiff
path: root/drivers/nvme/host/ioctl.c
diff options
context:
space:
mode:
authormin15.li <min15.li@samsung.com>2023-05-26 20:06:56 +0300
committerKeith Busch <kbusch@kernel.org>2023-05-30 18:50:24 +0300
commit31a5978243d24d77be4bacca56c78a0fbc43b00d (patch)
treeca1c97cefc6d8979e9ba062a931e7fd42d1bfcdb /drivers/nvme/host/ioctl.c
parenta3a9d63dcd15535e7fdf4c7c1b32bfaed762973a (diff)
downloadlinux-31a5978243d24d77be4bacca56c78a0fbc43b00d.tar.xz
nvme: fix miss command type check
In the function nvme_passthru_end(), only the value of the command opcode is checked, without checking the command type (IO command or Admin command). When we send a Dataset Management command (The opcode of the Dataset Management command is the same as the Set Feature command), kernel thinks it is a set feature command, then sets the controller's keep alive interval, and calls nvme_keep_alive_work(). Signed-off-by: min15.li <min15.li@samsung.com> Reviewed-by: Kanchan Joshi <joshi.k@samsung.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'drivers/nvme/host/ioctl.c')
-rw-r--r--drivers/nvme/host/ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/ioctl.c b/drivers/nvme/host/ioctl.c
index 81c5c9e38477..f15e7330b75a 100644
--- a/drivers/nvme/host/ioctl.c
+++ b/drivers/nvme/host/ioctl.c
@@ -254,7 +254,7 @@ static int nvme_submit_user_cmd(struct request_queue *q,
blk_mq_free_request(req);
if (effects)
- nvme_passthru_end(ctrl, effects, cmd, ret);
+ nvme_passthru_end(ctrl, ns, effects, cmd, ret);
return ret;
}