diff options
author | James Smart <jsmart2021@gmail.com> | 2017-06-15 23:41:41 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-06-28 08:14:13 -0600 |
commit | 188f7e8a3789cb2e37b68903e0a40f406091fa97 (patch) | |
tree | 86cd7730e227343648a4e38042088563931107e0 /ipc | |
parent | 0b5a7669a457dd503b3d9922e931ecb01843a916 (diff) | |
download | linux-188f7e8a3789cb2e37b68903e0a40f406091fa97.tar.gz linux-188f7e8a3789cb2e37b68903e0a40f406091fa97.tar.bz2 linux-188f7e8a3789cb2e37b68903e0a40f406091fa97.zip |
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>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions