]> 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)
commitbf55765d2ca48fdb186c7ddc39d4551cf855dbe5
tree4d121f5c5de17c40a02b4945cf73d927d22fc22b
parent0ef227dacf89bb9b2f5af5bcec5fb39f3be91bbe
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: 0854337a388b ("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