public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Irvin Cote <irvincoteg@gmail.com>
To: hch@lst.de
Cc: kbusch@kernel.org, axboe@fb.com, sagi@grimberg.me,
	linux-nvme@lists.infradead.org, chaitanyak@nvidia.com,
	Irvin Cote <irvincoteg@gmail.com>
Subject: [PATCH 0/3] Adjusting deref count in nvme_init_ctrl
Date: Tue, 25 Apr 2023 18:18:33 -0300	[thread overview]
Message-ID: <20230425211836.14283-1-irvincoteg@gmail.com> (raw)

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



             reply	other threads:[~2023-04-25 21:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25 21:18 Irvin Cote [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230425211836.14283-1-irvincoteg@gmail.com \
    --to=irvincoteg@gmail.com \
    --cc=axboe@fb.com \
    --cc=chaitanyak@nvidia.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox