diff options
author | min15.li <min15.li@samsung.com> | 2023-05-26 19:06:56 +0200 |
---|---|---|
committer | Keith Busch <kbusch@kernel.org> | 2023-05-30 17:50:24 +0200 |
commit | 31a5978243d24d77be4bacca56c78a0fbc43b00d (patch) | |
tree | ca1c97cefc6d8979e9ba062a931e7fd42d1bfcdb /drivers/nvme/target/passthru.c | |
parent | NVMe: Add MAXIO 1602 to bogus nid list. (diff) | |
download | linux-31a5978243d24d77be4bacca56c78a0fbc43b00d.tar.xz linux-31a5978243d24d77be4bacca56c78a0fbc43b00d.zip |
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 '')
-rw-r--r-- | drivers/nvme/target/passthru.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/target/passthru.c b/drivers/nvme/target/passthru.c index 511c980d538d..71a9c1cc57f5 100644 --- a/drivers/nvme/target/passthru.c +++ b/drivers/nvme/target/passthru.c @@ -243,7 +243,7 @@ static void nvmet_passthru_execute_cmd_work(struct work_struct *w) blk_mq_free_request(rq); if (effects) - nvme_passthru_end(ctrl, effects, req->cmd, status); + nvme_passthru_end(ctrl, ns, effects, req->cmd, status); } static enum rq_end_io_ret nvmet_passthru_req_done(struct request *rq, |