summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDavid Milburn <dmilburn@redhat.com>2020-09-03 01:42:54 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-23 13:40:37 +0300
commit103e82d5e82b6c4e21163d9ddbb30a76595ffe40 (patch)
treedb374cfb10881174a9ce695c3588560d50d30fba /drivers
parent4951def1e25873e6d102297c20d2f755f106617d (diff)
downloadlinux-103e82d5e82b6c4e21163d9ddbb30a76595ffe40.tar.xz
nvme-fc: cancel async events before freeing event struct
[ Upstream commit e126e8210e950bb83414c4f57b3120ddb8450742 ] Cancel async event work in case async event has been queued up, and nvme_fc_submit_async_event() runs after event has been freed. Signed-off-by: David Milburn <dmilburn@redhat.com> Reviewed-by: Keith Busch <kbusch@kernel.org> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/nvme/host/fc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index dce4d6782ceb..dae050d1f814 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -1820,6 +1820,7 @@ nvme_fc_term_aen_ops(struct nvme_fc_ctrl *ctrl)
struct nvme_fc_fcp_op *aen_op;
int i;
+ cancel_work_sync(&ctrl->ctrl.async_event_work);
aen_op = ctrl->aen_ops;
for (i = 0; i < NVME_NR_AEN_COMMANDS; i++, aen_op++) {
if (!aen_op->fcp_req.private)