From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Tue, 18 Oct 2005 04:36:20 +0000 Subject: Re: synchronization (or lack thereof) for uevents Message-Id: <20051018043620.GA9622@kroah.com> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Mon, Oct 17, 2005 at 10:42:22PM -0400, goggin, edward wrote: > > > It also appears that the code following the kobject_hotplug() > > > call in del_gendisk() has executed since when a uevent is > > > serviced, the call to kobject_del() has already deleted the > > > sysfs directory for the block device being removed. > > > > Yes, you get the event after the sysfs stuff is gone, how else could > > that work? :) > > The kernel code is calling kobject_hotplug before calling kobject_del. Yes, how else would it work? kobject_del() destroys the data that kobject_hotplug needs to work properly. > Doesn't this mean that the event is generated before the sysfs stuff > is gone? By a few cycles, yes. > It is only the fact that the event is queued in the receiver's > socket buffer before being serviced that causes the receiver to see the > sysfs stuff being gone by the time it gets to service the event. No, same thing happens if you use the /sbin/hotplug call too. Been this way since we started generating hotplug remove events. Is this a problem somehow? thanks, greg k-h ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel