mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
nvme-fc: fix racing controller reset and create association
[ Upstream commitf20ef34d71] 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:19fce0470f("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d1d918492e
commit
6cf11f3a09
@@ -2055,7 +2055,7 @@ done:
|
||||
nvme_fc_complete_rq(rq);
|
||||
|
||||
check_error:
|
||||
if (terminate_assoc)
|
||||
if (terminate_assoc && ctrl->ctrl.state != NVME_CTRL_RESETTING)
|
||||
queue_work(nvme_reset_wq, &ctrl->ioerr_work);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user