Skip to content

Commit 6cf11f3

Browse files
jsmart-ghgregkh
authored andcommitted
nvme-fc: fix racing controller reset and create association
[ Upstream commit f20ef34 ] Recent patch to prevent calling __nvme_fc_abort_outstanding_ios in interrupt context results in a possible race condition. A controller reset results in errored io completions, which schedules error work. The change of error work to a work element allows it to fire after the ctrl state transition to NVME_CTRL_CONNECTING, causing any outstanding io (used to initialize the controller) to fail and cause problems for connect_work. Add a state check to only schedule error work if not in the RESETTING state. Fixes: 19fce04 ("nvme-fc: avoid calling _nvme_fc_abort_outstanding_ios from interrupt context") Signed-off-by: Nigel Kirkland <nkirkland2304@gmail.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent d1d9184 commit 6cf11f3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/nvme/host

‎drivers/nvme/host/fc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2055,7 +2055,7 @@ nvme_fc_fcpio_done(struct nvmefc_fcp_req *req)
20552055
nvme_fc_complete_rq(rq);
20562056

20572057
check_error:
2058-
if (terminate_assoc)
2058+
if (terminate_assoc && ctrl->ctrl.state != NVME_CTRL_RESETTING)
20592059
queue_work(nvme_reset_wq, &ctrl->ioerr_work);
20602060
}
20612061

0 commit comments

Comments
 (0)