[PATCH V2 0/2] nvme: fix module ref count Oops

Chaitanya Kulkarni chaitanya.kulkarni at wdc.com
Tue Sep 15 23:53:24 EDT 2020


Hi,

For nvme-ctrl char device we don't currently get the ctrl's module
refcount. This leads to the Oops. In this series, we get/put the 
module refcount in nvme-ctrl char dev open/release, lift the file
opening from the host-core to caller in the NVMeOF target
passthru and take the ctrl refcount in into the 
nvmet_passthru_ctrl_enable().

-Chaitanya

Changes from V1: -

1. Move last patch to get the module refcount to start of the series.
2. De-couple the module refcount get/put from nvme_dev_open() and
   nvme_dev_release().

Chaitanya Kulkarni (2):
  nvme-core: fix nvme module ref count Oops
  nvme: decouple nvme_get_ctrl() from file open

 drivers/nvme/host/core.c       | 28 +++++++++++++++++-----------
 drivers/nvme/host/nvme.h       |  2 +-
 drivers/nvme/target/nvmet.h    |  1 +
 drivers/nvme/target/passthru.c | 19 +++++++++++++++----
 4 files changed, 34 insertions(+), 16 deletions(-)

-- 
2.22.1




More information about the Linux-nvme mailing list