]> git.baikalelectronics.ru Git - kernel.git/commit
nvme_fc: fix double calls to nvme_cleanup_cmd()
authorJames Smart <jsmart2021@gmail.com>
Thu, 22 Jun 2017 00:43:05 +0000 (17:43 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 28 Jun 2017 14:14:13 +0000 (08:14 -0600)
commit0a56f72bc34de299c55412e8918d7f1951f7fcc4
tree58838c07fa69d202c2ecf3a36cb884e396d4f8e2
parent45c3dc9065834e196a2dc3a71c7ff203c0e1efa6
nvme_fc: fix double calls to nvme_cleanup_cmd()

Current fc transport code, on io termination, is calling
nvme_cleanup_cmd() followed by the transport dma unmap routine
which also calls nvme_cleanup_cmd(). Which means two kfrees occur
on the same address, raising havoc. This resulted in odd data errors,
effectively corruption..

Fix by removing the extraneous double calls. Call now occurs only in
teardown paths and as part of dma unmap routine.

Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/fc.c