summaryrefslogtreecommitdiffstats
path: root/tools/thermal/tmon
diff options
context:
space:
mode:
authorKeith Busch2018-07-12 00:44:44 +0200
committerChristoph Hellwig2018-07-12 08:23:56 +0200
commitb6e44b4c74ef75f729f0147d43d189173fe463c9 (patch)
treed8ae6812233e06ffe1140a44afca7fbe4d5c32ef /tools/thermal/tmon
parentbsg: fix bogus EINVAL on non-data commands (diff)
downloadkernel-qcow2-linux-b6e44b4c74ef75f729f0147d43d189173fe463c9.tar.gz
kernel-qcow2-linux-b6e44b4c74ef75f729f0147d43d189173fe463c9.tar.xz
kernel-qcow2-linux-b6e44b4c74ef75f729f0147d43d189173fe463c9.zip
nvme-pci: fix memory leak on probe failure
The nvme driver specific structures need to be initialized prior to enabling the generic controller so we can unwind on failure with out using the reference counting callbacks so that 'probe' and 'remove' can be symmetric. The newly added iod_mempool is the only resource that was being allocated out of order, and a failure there would leak the generic controller memory. This patch just moves that allocation above the controller initialization. Fixes: 943e942e6266f ("nvme-pci: limit max IO size and segments to avoid high order allocations") Reported-by: Weiping Zhang <zwp10758@gmail.com> Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'tools/thermal/tmon')
0 files changed, 0 insertions, 0 deletions