]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
nvme-fcloop: Fix dropped LS's to removed target port
authorJames Smart <jsmart2021@gmail.com>
Thu, 9 Aug 2018 23:00:14 +0000 (16:00 -0700)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:51:34 +0000 (19:51 -0600)
commit497da67720db8ea5004eb2e001bc2bb26fa21fdb
tree229fb46466f8775535e04a5e0ef286f91b7ba96e
parentb7b530dc54d4d496eaff968b6388a549a86e5ca5
nvme-fcloop: Fix dropped LS's to removed target port

BugLink: https://bugs.launchpad.net/bugs/1836287
[ Upstream commit afd299ca996929f4f98ac20da0044c0cdc124879 ]

When a targetport is removed from the config, fcloop will avoid calling
the LS done() routine thinking the targetport is gone. This leaves the
initiator reset/reconnect hanging as it waits for a status on the
Create_Association LS for the reconnect.

Change the filter in the LS callback path. If tport null (set when
failed validation before "sending to remote port"), be sure to call
done. This was the main bug. But, continue the logic that only calls
done if tport was set but there is no remoteport (e.g. case where
remoteport has been removed, thus host doesn't expect a completion).

Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/nvme/target/fcloop.c