]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
nvme: fix per-namespace chardev deletion
authorAdam Manzanares <a.manzanares@samsung.com>
Wed, 13 Oct 2021 15:04:19 +0000 (15:04 +0000)
committerChristoph Hellwig <hch@lst.de>
Thu, 14 Oct 2021 06:07:47 +0000 (08:07 +0200)
commitbe5eb933542629ad6a7d4c92097b1b472b1612d0
tree10f011cf9460d5e6b4051493750d9214e30a0b45
parent85f74acf097a63a07f5a7c215db6883e5c35e3ff
nvme: fix per-namespace chardev deletion

Decrease reference count of chardevice during char device deletion in
order to fix a memory leak.  Add a release callabck for the device
associated chardev and move ida_simple_remove into the release function.

Fixes: 2637baed7801 ("nvme: introduce generic per-namespace chardev")
Reported-by: Yi Zhang <yi.zhang@redhat.com>
Suggested-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Adam Manzanares <a.manzanares@samsung.com>
Reviewed-by: Javier González <javier@javigon.com>
Tested-by: Yi Zhang <yi.zhang@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c
drivers/nvme/host/multipath.c