linux-sg2042/drivers/nvme/target
James Smart 188f7e8a37 nvmet_fc: fix crashes on bad opcodes
if a nvme command is issued with an opcode that is not supported by
the target (example: opcode 21 - detach namespace), the target
crashes due to a null pointer.

nvmet_req_init() detects the bad opcode and immediately calls the nvme
command done routine with an error status, allowing the transport to
send the response. However, the FC transport was aborting the command
on error, so the abort freed the lldd point, but the rsp transmit path
referenced it psot the free.

Fix by removing the abort call on nvmet_req_init() failure.
The completion response will be sent with an error status code.

As the completion path will terminate the io, ensure the data_sg
lists show an unused state so that teardown paths are successful.

Signed-off-by: Paul Ely <Paul.Ely@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2017-06-28 08:14:13 -06:00
..
Kconfig nvme-fabrics: Add FC LLDD loopback driver to test FC-NVME 2016-12-06 14:51:48 +01:00
Makefile nvme-fabrics: Add FC LLDD loopback driver to test FC-NVME 2016-12-06 14:51:48 +01:00
admin-cmd.c nvmet: implement namespace identify descriptor list 2017-06-15 14:30:21 +02:00
configfs.c nvmet: allow overriding the NVMe VS via configfs 2017-06-15 14:30:23 +02:00
core.c nvmet: implement namespace identify descriptor list 2017-06-15 14:30:21 +02:00
discovery.c nvme: use a single NVME_AQ_DEPTH and relax it to 32 2017-06-28 08:14:13 -06:00
fabrics-cmd.c nvmet: convert from kmap to nvmet_copy_from_sgl 2017-04-21 16:41:47 +02:00
fc.c nvmet_fc: fix crashes on bad opcodes 2017-06-28 08:14:13 -06:00
fcloop.c nvmet-fc: Remove a set-but-not-used variable 2017-06-15 14:30:25 +02:00
io-cmd.c block: switch bios to blk_status_t 2017-06-09 09:27:32 -06:00
loop.c nvme: read the subsystem NQN from Identify Controller 2017-06-28 08:14:13 -06:00
nvmet.h nvmet: implement namespace identify descriptor list 2017-06-15 14:30:21 +02:00
rdma.c nvme: use a single NVME_AQ_DEPTH and relax it to 32 2017-06-28 08:14:13 -06:00