aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid Milburn <dmilburn@redhat.com>2020-09-02 17:42:54 -0500
committerChristoph Hellwig <hch@lst.de>2020-09-08 19:46:29 +0200
commite126e8210e950bb83414c4f57b3120ddb8450742 (patch)
treebe1d942890408c2ea039eb4541c5d5fe49f0230d /drivers
parentnvme: Revert: Fix controller creation races with teardown flow (diff)
downloadlinux-dev-e126e8210e950bb83414c4f57b3120ddb8450742.tar.xz
linux-dev-e126e8210e950bb83414c4f57b3120ddb8450742.zip
nvme-fc: cancel async events before freeing event struct
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>
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 a7f474ddfff7..e8ef42b9d50c 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -2160,6 +2160,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++) {
__nvme_fc_exit_request(ctrl, aen_op);