stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "nvmet: cancel fatal error and flush async work before free controller" has been added to the 4.9-stable tree
@ 2017-12-06 17:00 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-12-06 17:00 UTC (permalink / raw)
  To: sagi, alexander.levin, gregkh, hch, roys; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    nvmet: cancel fatal error and flush async work before free controller

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     nvmet-cancel-fatal-error-and-flush-async-work-before-free-controller.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Wed Dec  6 17:39:55 CET 2017
From: Sagi Grimberg <sagi@grimberg.me>
Date: Sun, 1 Jan 2017 13:41:56 +0200
Subject: nvmet: cancel fatal error and flush async work before free controller

From: Sagi Grimberg <sagi@grimberg.me>


[ Upstream commit 06406d81a2d7cfb8abcc4fa6cdfeb8e5897007c5 ]

Make sure they are not running and we can free the controller
safely.

Signed-off-by: Roy Shterman <roys@lightbitslabs.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/nvme/target/core.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -816,6 +816,9 @@ static void nvmet_ctrl_free(struct kref
 	list_del(&ctrl->subsys_entry);
 	mutex_unlock(&subsys->lock);
 
+	flush_work(&ctrl->async_event_work);
+	cancel_work_sync(&ctrl->fatal_err_work);
+
 	ida_simple_remove(&subsys->cntlid_ida, ctrl->cntlid);
 	nvmet_subsys_put(subsys);
 


Patches currently in stable-queue which might be from sagi@grimberg.me are

queue-4.9/nvmet-cancel-fatal-error-and-flush-async-work-before-free-controller.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-06 17:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-06 17:00 Patch "nvmet: cancel fatal error and flush async work before free controller" has been added to the 4.9-stable tree gregkh

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).