[PATCH 0/3] Adjusting deref count in nvme_init_ctrl
Irvin Cote
irvincoteg at gmail.com
Tue Apr 25 14:18:33 PDT 2023
The following three patches aim to solve the following issues:
-In case the teardown path of nvme_init_ctrl is triggered the driver
exits with a non-zero ref count on the controller.
-Teardown paths and the ctrl's release method perform similar tasks
leading to double-freeing issues.
In details:
-The first patch is just a ceanup of nvme_init_ctrl teardown logic.
-The second patch adds an nvme_put_ctrl at the end of nvme_init_ctrl's
teardown path to ensure the controller releases all references upon exit.
-The third one addresses the double-freeing issues
Irvin Cote (3):
nvme-core: nvme_init_ctrl cleanup
nvme-pci: Adjusting ctrl deref count
nvme-core: preventing double freeing in ctrl release
drivers/nvme/host/core.c | 20 ++++++++++----------
drivers/nvme/host/pci.c | 9 +++++++--
2 files changed, 17 insertions(+), 12 deletions(-)
--
2.39.2
More information about the Linux-nvme
mailing list