From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Tue, 14 Jun 2005 14:22:49 +0000 Subject: Re: usb race possible? Message-Id: <20050614142249.GA29259@vrfy.org> 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 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