Re: [PATCH 1/2] block: grab a device refcount in disk_uevent

From
Christoph Hellwig <hch@lst.de>
Date
2021-07-01 09:49:20
Reply to
Ming Lei, 2021-07-01
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.
Thread (9 messages) 9 messages, 3 authors, last reply 2021-07-01
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help