]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nvme: do not try to reconfigure APST when the controller is not live
authorChristoph Hellwig <hch@lst.de>
Fri, 9 Apr 2021 09:46:12 +0000 (11:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 08:08:33 +0000 (10:08 +0200)
commit7f6a9044ff241ba45b3842c36212efe7a09b1443
treedba39d775b8edcc48e58a1379fcea3f43340cea3
parentaa9d659856b170e042ab428c08e2bd5e6c232181
nvme: do not try to reconfigure APST when the controller is not live

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@lenovo.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvme/host/core.c