OSDN Git Service

nvme-fc: avoid calling _nvme_fc_abort_outstanding_ios from interrupt context
authorJames Smart <james.smart@broadcom.com>
Wed, 2 Dec 2020 01:52:43 +0000 (17:52 -0800)
committerChristoph Hellwig <hch@lst.de>
Wed, 6 Jan 2021 09:30:36 +0000 (10:30 +0100)
commit19fce0470f05031e6af36e49ce222d0f0050d432
tree4d121f5c5de17c40a02b4945cf73d927d22fc22b
parentaebf5db917055b38f4945ed6d621d9f07a44ff30
nvme-fc: avoid calling _nvme_fc_abort_outstanding_ios from interrupt context

Recent patches changed calling sequences. nvme_fc_abort_outstanding_ios
used to be called from a timeout or work context. Now it is being called
in an io completion context, which can be an interrupt handler.
Unfortunately, the abort outstanding ios routine attempts to stop nvme
queues and nested routines that may try to sleep, which is in conflict
with the interrupt handler.

Correct replacing the direct call with a work element scheduling, and the
abort outstanding ios routine will be called in the work element.

Fixes: 95ced8a2c72d ("nvme-fc: eliminate terminate_io use by nvme_fc_error_recovery")
Signed-off-by: James Smart <james.smart@broadcom.com>
Reported-by: Daniel Wagner <dwagner@suse.de>
Tested-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/fc.c