linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
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 3/3] nvme-fc: cancel async events before freeing event struct
Date: Wed,  2 Sep 2020 17:42:54 -0500	[thread overview]
Message-ID: <1599086574-85969-4-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_fc_submit_async_event() runs after event has
been freed.

Signed-off-by: David Milburn <dmilburn@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


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  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 ` [PATCH v3 1/3] nvme-rdma: " David Milburn
2020-09-02 22:42 ` [PATCH v3 2/3] nvme-tcp: " David Milburn
2020-09-02 22:42 ` David Milburn [this message]
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-4-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).