[PATCH v3 3/3] nvme-fc: cancel async events before freeing event struct
David Milburn
dmilburn at redhat.com
Wed Sep 2 18:42:54 EDT 2020
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 at redhat.com>
---
drivers/nvme/host/fc.c | 1 +
1 file changed, 1 insertion(+)
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);
--
2.18.1
More information about the Linux-nvme
mailing list