From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: usb race possible?
Date: Tue, 14 Jun 2005 14:22:49 +0000 [thread overview]
Message-ID: <20050614142249.GA29259@vrfy.org> (raw)
In-Reply-To: <pan.2005.06.14.13.35.59.94445@leogic.com>
On Tue, Jun 14, 2005 at 03:35:59PM +0200, Andreas Jellinghaus wrote:
> Hi,
>
> if a new usb device is added the kernel
> generates a hotplug event including the
> path to the usb device.
>
> does the kernel guarantee that the device
> in the usb device filesystem is available
> when the hotplug script is called?
>
> I have one user here where it seems that
> sometimes the process started via hotplug
> is too fast, i.e. open on the usb device
> fails. manualy running lsusb shows the
> device. linux kernel 2.6.11 (-gentoo,
> not sure what they changed).
>
> so could this be a race condition? any other
> idea how I can debug the issue? for now I added
> a "sleep 1" to the hotplug handler before the
> open and it seems to cure the problem.
That is ok, you need to wait in userspace for the files to show up.
It's not easy to fix in the kernel. Maybe we will get there some day...
Kay
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r
_______________________________________________
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
next prev parent reply other threads:[~2005-06-14 14:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-14 13:35 usb race possible? Andreas Jellinghaus
2005-06-14 14:22 ` Kay Sievers [this message]
2005-06-15 13:33 ` Andreas Jellinghaus
2005-06-15 14:28 ` Greg KH
2005-06-15 14:32 ` Andreas Jellinghaus
2005-06-15 22:04 ` Greg KH
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=20050614142249.GA29259@vrfy.org \
--to=kay.sievers@vrfy.org \
--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).