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.