]> git.baikalelectronics.ru Git - kernel.git/commit
nvme_fc: Fix crash when nvme controller connection fails.
authorJames Smart <jsmart2021@gmail.com>
Fri, 16 Jun 2017 06:40:54 +0000 (23:40 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 28 Jun 2017 14:14:13 +0000 (08:14 -0600)
commitab5a7383b61e8a7994fdbaa211b93af12285c5dc
tree634d2c3787b7897bc823457f51f9e9a24c9fe9a5
parent806db29c9100204089db59a8185e7f464e749a62
nvme_fc: Fix crash when nvme controller connection fails.

If a controller connection is attempted (say to a subsystem that
does not exist), the first attempt errors out.  If another connect
is attempted, it crashes.

Issue is the prior controller has yet execute it's final put, thus
its still on lists. However, opts points on it have been cleared, thus
causing the crash if they are referenced.

Fix is to add the missing put after the nvme_uninit_ctrl() call on
the attachment failure.

Signed-off-by: Paul Ely <Paul.Ely@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/fc.c