Thread (14 messages) 14 messages, 4 authors, 2021-10-13

Re: [bug report] kmemleak observed with blktests nvme-tcp tests

From: Sagi Grimberg <sagi@grimberg.me>
Date: 2021-09-30 14:08:51
Subsystem: nvm express driver, the rest · Maintainers: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg, Linus Torvalds

Bisect shows it was introduced from the below commit:

commit 2637baed78010eeaae274feb5b99ce90933fadfb
Author: Minwoo Im [off-list ref]
Date:   Wed Apr 21 16:45:04 2021 +0900

     nvme: introduce generic per-namespace chardev
Makes sense as both leaks relate to the nshead cdev...

I think another put on the cdev_device is missing?
--
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 1d103ae4afdf..328e314af199 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3668,6 +3668,7 @@ void nvme_cdev_del(struct cdev *cdev, struct 
device *cdev_device)
  {
         cdev_device_del(cdev, cdev_device);
         ida_simple_remove(&nvme_ns_chr_minor_ida, 
MINOR(cdev_device->devt));
+       put_device(cdev_device);
  }

  int nvme_cdev_add(struct cdev *cdev, struct device *cdev_device,
--

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help