[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YVVQZ/yVpFJ7Abg5@kroah.com>
Date: Thu, 30 Sep 2021 07:51:35 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Ming Lei <ming.lei@...hat.com>
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 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.
greg k-h
Powered by blists - more mailing lists