diff options
author | David Milburn <dmilburn@redhat.com> | 2020-09-02 17:42:52 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-09-08 19:46:29 +0200 |
commit | 925dd04c1f9825194b9e444c12478084813b2b5d (patch) | |
tree | 6dc1b600d9fc8c7105c655f98df9ce7c927e8f05 /drivers/nvme | |
parent | e126e8210e950bb83414c4f57b3120ddb8450742 (diff) | |
download | linux-925dd04c1f9825194b9e444c12478084813b2b5d.tar.bz2 |
nvme-rdma: cancel async events before freeing event struct
Cancel async event work in case async event has been queued up, and
nvme_rdma_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/nvme')
-rw-r--r-- | drivers/nvme/host/rdma.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index 1d8ea5305d60..3247d4ee46b1 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -835,6 +835,7 @@ static void nvme_rdma_destroy_admin_queue(struct nvme_rdma_ctrl *ctrl, blk_mq_free_tag_set(ctrl->ctrl.admin_tagset); } if (ctrl->async_event_sqe.data) { + cancel_work_sync(&ctrl->ctrl.async_event_work); nvme_rdma_free_qe(ctrl->device->dev, &ctrl->async_event_sqe, sizeof(struct nvme_command), DMA_TO_DEVICE); ctrl->async_event_sqe.data = NULL; |