]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nvme: fix memory leak for power latency tolerance
authorYufen Yu <yuyufen@huawei.com>
Fri, 17 May 2019 02:30:07 +0000 (19:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Jun 2019 06:18:03 +0000 (08:18 +0200)
commitc0d3e166e16ac8f12fc005e620671671f4d2ae0f
tree1921f621d398cb49471d4a9836f461f5daaa4c01
parentddda7e850bf10302b0bb6036dde40e60d8377f3a
nvme: fix memory leak for power latency tolerance

[ Upstream commit 510a405d945bc985abc513fafe45890cac34fafa ]

Unconditionally hide device pm latency tolerance when uninitializing
the controller to ensure all qos resources are released so that we're
not leaking this memory. This is safe to call if none were allocated in
the first place, or were previously freed.

Fixes: c5552fde102fc("nvme: Enable autonomous power state transitions")
Suggested-by: Keith Busch <keith.busch@intel.com>
Tested-by: David Milburn <dmilburn@redhat.com>
Signed-off-by: Yufen Yu <yuyufen@huawei.com>
[changelog]
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/core.c