diff options
author | David Milburn <dmilburn@redhat.com> | 2020-09-03 00:42:53 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-09-08 19:46:29 +0200 |
commit | ceb1e0874dba5cbfc4e0b4145796a4bfb3716e6a (patch) | |
tree | a62b4ab8d3ada04d2872f8e82fa4e56b34e028fe /drivers | |
parent | nvme-rdma: cancel async events before freeing event struct (diff) | |
download | linux-ceb1e0874dba5cbfc4e0b4145796a4bfb3716e6a.tar.xz linux-ceb1e0874dba5cbfc4e0b4145796a4bfb3716e6a.zip |
nvme-tcp: cancel async events before freeing event struct
Cancel async event work in case async event has been queued up, and
nvme_tcp_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/tcp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index 873d6afcbc9e..245a73d0a1ca 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -1597,6 +1597,7 @@ static struct blk_mq_tag_set *nvme_tcp_alloc_tagset(struct nvme_ctrl *nctrl, static void nvme_tcp_free_admin_queue(struct nvme_ctrl *ctrl) { if (to_tcp_ctrl(ctrl)->async_req.pdu) { + cancel_work_sync(&ctrl->async_event_work); nvme_tcp_free_async_req(to_tcp_ctrl(ctrl)); to_tcp_ctrl(ctrl)->async_req.pdu = NULL; } |