-----Original Message----- From: Jason Gunthorpe jgg@ziepe.ca Sent: Thursday, March 26, 2020 6:37 PM To: Wan, Kaike kaike.wan@intel.com Cc: Dalessandro, Dennis dennis.dalessandro@intel.com; dledford@redhat.com; linux-rdma@vger.kernel.org; Marciniszyn, Mike mike.marciniszyn@intel.com; stable@vger.kernel.org Subject: Re: [PATCH for-rc 1/2] IB/hfi1: Fix memory leaks in sysfs registration and unregistration
On Thu, Mar 26, 2020 at 10:24:51PM +0000, Wan, Kaike wrote:
To see if there is an issue here delete the kobject_del and kobject_put entirely to leave a dangling sysfs during registration and see if ib device unregistration explodes.
I tried a patch wherein the function hfi1_verbs_unregister_sysfs() is never called at all and when unloading the driver the ib device un-registration went through smoothly(no error, the /sys/class/infiniband/hfi1_0 directory gone). Only kmemleak complaints were observed.
Then perhaps there is nothing to worry about and the patches are fine
Then I don't have to re-spin the patches?
Kaike