Skip to content

Adjusting deref count in nvme_init_ctrl

Irvin Cote linux-nvme 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3nvme-core: nvme_init_ctrl cleanupdrivers/nvme/host/core.c+5 -80 replies
2/3nvme-pci: Adjusting ctrl deref countdrivers/nvme/host/pci.c+1 -00 replies
3/3nvme-core: preventing double freeing in ctrl releasedrivers/nvme/host/core.c drivers/nvme/host/pci.c+11 -42 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Adjusting deref count in nvme_init_ctrl

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(-)
Signature · 1 line
2.39.2