Re: [PATCH 1/2] driver core: tell caller if the device/kboject is really released

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 30, 2021 at 07:51:35AM +0200, Greg Kroah-Hartman wrote:
> On Thu, Sep 30, 2021 at 01:20:27PM +0800, Ming Lei wrote:
> > Return if the device/kobject is really released to caller.
> > 
> > One use case is scsi_device_put() and the scsi device's release handler
> > runs async work to clean up things. We have to piggyback the module_put()
> > into the async work for avoiding to touch unmapped module page.
> > 
> > Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx>
> > ---
> >  drivers/base/core.c     | 5 +++--
> >  include/linux/device.h  | 2 +-
> >  include/linux/kobject.h | 2 +-
> >  lib/kobject.c           | 5 +++--
> >  4 files changed, 8 insertions(+), 6 deletions(-)
> 
> I really don't like this as you should not ever care if you are
> releasing the last reference on an object or not.
> 
> Why are you needing this?
> 
> And if you really do need this, you MUST document how this works in the
> apis you are changing here, so I can't take this as is sorry.

Please ignore this series, and I have one better approach to address the
issue, will send it out soon.


Thanks,
Ming




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux