summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2018-02-06 15:48:29 +0100
committerSagi Grimberg <sagi@grimberg.me>2018-02-11 09:45:34 +0100
commit3efd6e8ebe19f0774c82de582849539b60cc4d97 (patch)
tree7b920c5ea26231bc3d1d00858cadee1e5674d253 /drivers/tty
parentnvme: Fix discard buffer overrun (diff)
downloadlinux-3efd6e8ebe19f0774c82de582849539b60cc4d97.tar.xz
linux-3efd6e8ebe19f0774c82de582849539b60cc4d97.zip
nvme_fc: correct abort race condition on resets
During reset handling, there is live io completing while the reset is taking place. The reset path attempts to abort all outstanding io, counting the number of ios that were reset. It then waits for those ios to be reclaimed from the lldd before continuing. The transport's logic on io state and flag setting was poor, allowing ios to complete simultaneous to the abort request. The completed ios were counted, but as the completion had already occurred, the completion never reduced the count. As the count never zeros, the reset/delete never completes. Tighten it up by unconditionally changing the op state to completed when the io done handler is called. The reset/abort path now changes the op state to aborted, but the abort only continues if the op state was live priviously. If complete, the abort is backed out. Thus proper counting of io aborts and their completions is working again. Also removed the TERMIO state on the op as it's redundant with the op's aborted state. Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: James Smart <james.smart@broadcom.com> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Diffstat (limited to 'drivers/tty')
0 files changed, 0 insertions, 0 deletions