From: Christoph Hellwig <hch@lst.de>
To: Ming Lei <ming.lei@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>,
axboe@kernel.dk, linux-block@vger.kernel.org
Subject: Re: [PATCH 1/2] block: grab a device refcount in disk_uevent
Date: Thu, 1 Jul 2021 11:49:16 +0200 [thread overview]
Message-ID: <20210701094915.GA2066@lst.de> (raw)
In-Reply-To: <YN2KiYTtA0ribi9i@T590>
On Thu, Jul 01, 2021 at 05:27:37PM +0800, Ming Lei wrote:
>
> Maybe the reason is that sending uevent needs the device/kobject not
> 'released' in viewpoint of driver core world, other device resource(such
> as device name) may be referred but have been freed.
>
> If that is the reason, this patch looks fine, and
> kobject_get_unless_zero() may be replaced with get_device() since the
> referred memory isn't freed yet.
Yes, sorry. Braino while looking up the cause. But there isn't much
of a point in sending a uevent to a partition already deleted, so
I think the unless_zero here still makes sense.
next prev parent reply other threads:[~2021-07-01 9:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-01 8:16 two fixup for the block_device / hd_struct merge Christoph Hellwig
2021-07-01 8:16 ` [PATCH 1/2] block: grab a device refcount in disk_uevent Christoph Hellwig
2021-07-01 8:54 ` Ming Lei
2021-07-01 9:02 ` Christoph Hellwig
2021-07-01 9:17 ` Ming Lei
2021-07-01 9:27 ` Ming Lei
2021-07-01 9:49 ` Christoph Hellwig [this message]
2021-07-01 8:16 ` [PATCH 2/2] block: remove the bdgrab in blk_drop_partitions Christoph Hellwig
2021-07-01 16:21 ` two fixup for the block_device / hd_struct merge Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210701094915.GA2066@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox