Skip to contentSkip to conversation

Patch "nvmet: cancel fatal error and flush async work before free controller" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Dec 6, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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 <[email protected]> know about it.

Quoted 1 line

From foo@baz Wed Dec 6 17:39:55 CET 2017

From: Sagi Grimberg <[email protected]>
Date: Sun, 1 Jan 2017 13:41:56 +0200
Subject: nvmet: cancel fatal error and flush async work before free controller

From: Sagi Grimberg <[email protected]>

[ Upstream commit 06406d81a2d7cfb8abcc4fa6cdfeb8e5897007c5 ]

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

---
 drivers/nvme/target/core.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/nvme/target/core.c +3 -0
@@ -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 [email protected] are

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