]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita91839ff44a630740ffe0a982a9ffbc316e98252
tree4d121f5c5de17c40a02b4945cf73d927d22fc22b
parent2dc299f9d3c285ce0c030f1c5c4072e5e40722d1
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: 5e5430c36523 ("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