]> git.baikalelectronics.ru Git - kernel.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)
committerKeith Busch <keith.busch@intel.com>
Fri, 17 May 2019 17:08:09 +0000 (11:08 -0600)
commit3d89698fc3a8cd0bc3c8d3b4a2a35e27efd70809
tree9bfbd1bf8a1ef26b8a13a5c802b0eef668aa3241
parent26726ea103979bea8f05c2b129d4031deae4d3b7
nvme: fix memory leak for power latency tolerance

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: 849591e3f5fe4("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>
drivers/nvme/host/core.c