Re: [PATCH 1/1] kobject: Don't emit change events if not in sysfs
From: Greg Kroah-Hartman
Date: Tue Oct 20 2020 - 01:57:01 EST
On Mon, Oct 19, 2020 at 03:32:57PM -0700, Abhishek Pandit-Subedi wrote:
> Add a check to make sure the kobj is created and in sysfs before sending
> a change event notification. Otherwise, udev rules that depend on the
> change notification may find that the path that changed doesn't actually
> exist.
Why is the user of the kobject trying to emit a uevent before it is
registered? Shouldn't we fix the root problem here instead? Otherwise
the event is still "gone", the caller will not know what to do about it.
Please fix the root problem here.
thanks,
greg k-h