public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Adjusting deref count in nvme_init_ctrl
@ 2023-04-25 21:18 Irvin Cote
  2023-04-25 21:18 ` [PATCH 1/3] nvme-core: nvme_init_ctrl cleanup Irvin Cote
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Irvin Cote @ 2023-04-25 21:18 UTC (permalink / raw)
  To: hch; +Cc: kbusch, axboe, sagi, linux-nvme, chaitanyak, Irvin Cote

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-04-25 23:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-25 21:18 [PATCH 0/3] Adjusting deref count in nvme_init_ctrl Irvin Cote
2023-04-25 21:18 ` [PATCH 1/3] nvme-core: nvme_init_ctrl cleanup Irvin Cote
2023-04-25 21:18 ` [PATCH 2/3] nvme-pci: Adjusting ctrl deref count Irvin Cote
2023-04-25 21:18 ` [PATCH 3/3] nvme-core: preventing double freeing in ctrl release Irvin Cote
2023-04-25 21:45   ` Keith Busch
2023-04-25 23:19     ` irvin cote

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox