This is a note to let you know that I've just added the patch titled nvme: do not try to reconfigure APST when the controller is not live to the 4.19-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: nvme-do-not-try-to-reconfigure-apst-when-the-controller-is-not-live.patch and it can be found in the queue-4.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 53fe2a30bc168db9700e00206d991ff934973cf1 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig <hch@xxxxxx> Date: Fri, 9 Apr 2021 11:46:12 +0200 Subject: nvme: do not try to reconfigure APST when the controller is not live From: Christoph Hellwig <hch@xxxxxx> commit 53fe2a30bc168db9700e00206d991ff934973cf1 upstream. Do not call nvme_configure_apst when the controller is not live, given that nvme_configure_apst will fail due the lack of an admin queue when the controller is being torn down and nvme_set_latency_tolerance is called from dev_pm_qos_hide_latency_tolerance. Fixes: 510a405d945b("nvme: fix memory leak for power latency tolerance") Reported-by: Peng Liu <liupeng17@xxxxxxxxxx> Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Keith Busch <kbusch@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/nvme/host/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -2091,7 +2091,8 @@ static void nvme_set_latency_tolerance(s if (ctrl->ps_max_latency_us != latency) { ctrl->ps_max_latency_us = latency; - nvme_configure_apst(ctrl); + if (ctrl->state == NVME_CTRL_LIVE) + nvme_configure_apst(ctrl); } } Patches currently in stable-queue which might be from hch@xxxxxx are queue-4.19/modules-unexport-__module_address.patch queue-4.19/modules-mark-find_symbol-static.patch queue-4.19/modules-return-licensing-information-from-find_symbol.patch queue-4.19/vfio-mdev-do-not-allow-a-mdev_type-to-have-a-null-pa.patch queue-4.19/modules-inherit-taint_proprietary_module.patch queue-4.19/nvme-do-not-try-to-reconfigure-apst-when-the-controller-is-not-live.patch queue-4.19/modules-mark-ref_module-static.patch queue-4.19/nvme-retrigger-ana-log-update-if-group-descriptor-is.patch queue-4.19/modules-rename-the-licence-field-in-struct-symsearch-to-license.patch queue-4.19/md-factor-out-a-mddev_find_locked-helper-from-mddev_find.patch queue-4.19/modules-unexport-__module_text_address.patch queue-4.19/modules-mark-each_symbol_section-static.patch queue-4.19/md-md_open-returns-ebusy-when-entering-racing-area.patch queue-4.19/md-split-mddev_find.patch