[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YVVlpttsxZQ+S9X1@T590>
Date: Thu, 30 Sep 2021 15:22:14 +0800
From: Ming Lei <ming.lei@...hat.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
"Martin K . Petersen" <martin.petersen@...cle.com>,
Changhui Zhong <czhong@...hat.com>,
Yi Zhang <yi.zhang@...hat.com>
Subject: Re: [PATCH 1/2] driver core: tell caller if the device/kboject is
really released
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@...hat.com>
> > ---
> > 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
Powered by blists - more mailing lists