OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37f0dc2
)
nvme-pci: fixing memory leak in probe teardown path
author
Irvin Cote
<irvincoteg@gmail.com>
Wed, 8 Mar 2023 21:05:08 +0000
(18:05 -0300)
committer
Christoph Hellwig
<hch@lst.de>
Wed, 15 Mar 2023 13:58:51 +0000
(14:58 +0100)
In case the nvme_probe teardown path is triggered the ctrl ref count does
not reach 0 thus creating a memory leak upon failure of nvme_probe.
Signed-off-by: Irvin Cote <irvincoteg@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/pci.c
patch
|
blob
|
history
diff --git
a/drivers/nvme/host/pci.c
b/drivers/nvme/host/pci.c
index
5b95c94
..
e77a8a8
100644
(file)
--- a/
drivers/nvme/host/pci.c
+++ b/
drivers/nvme/host/pci.c
@@
-3073,6
+3073,7
@@
out_dev_unmap:
nvme_dev_unmap(dev);
out_uninit_ctrl:
nvme_uninit_ctrl(&dev->ctrl);
+ nvme_put_ctrl(&dev->ctrl);
return result;
}