From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: synchronization (or lack thereof) for uevents
Date: Tue, 18 Oct 2005 04:36:20 +0000 [thread overview]
Message-ID: <20051018043620.GA9622@kroah.com> (raw)
In-Reply-To: <C2EEB4E538D3DC48BF57F391F422779321AD2B@SRMANNING.eng.emc.com>
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
prev parent reply other threads:[~2005-10-18 4:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-17 15:26 synchronization (or lack thereof) for uevents goggin, edward
2005-10-18 1:06 ` Kay Sievers
2005-10-18 1:28 ` Greg KH
2005-10-18 1:53 ` goggin, edward
2005-10-18 2:33 ` Greg KH
2005-10-18 2:42 ` goggin, edward
2005-10-18 2:49 ` goggin, edward
2005-10-18 4:36 ` Greg KH [this message]
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=20051018043620.GA9622@kroah.com \
--to=greg@kroah.com \
--cc=linux-hotplug@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).