From: David Milburn <dmilburn@redhat.com>
To: linux-nvme@lists.infradead.org, sagi@grimberg.me, hch@lst.de,
james.smart@broadcom.com
Subject: [PATCH v3 1/3] nvme-rdma: cancel async events before freeing event struct
Date: Wed, 2 Sep 2020 17:42:52 -0500 [thread overview]
Message-ID: <1599086574-85969-2-git-send-email-dmilburn@redhat.com> (raw)
In-Reply-To: <1599086574-85969-1-git-send-email-dmilburn@redhat.com>
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>
---
drivers/nvme/host/rdma.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 8e5ffe2f117d..9e378d0a0c01 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;
--
2.18.1
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-09-02 22:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-02 22:42 [PATCH v3 0/3] nvme: cancel async events before freeing event struct David Milburn
2020-09-02 22:42 ` David Milburn [this message]
2020-09-02 22:42 ` [PATCH v3 2/3] nvme-tcp: " David Milburn
2020-09-02 22:42 ` [PATCH v3 3/3] nvme-fc: " David Milburn
2020-09-03 15:29 ` [PATCH v3 0/3] nvme: " Keith Busch
2020-09-03 21:26 ` Sagi Grimberg
2020-09-08 17:47 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1599086574-85969-2-git-send-email-dmilburn@redhat.com \
--to=dmilburn@redhat.com \
--cc=hch@lst.de \
--cc=james.smart@broadcom.com \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).