From: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
To: linux-hotplug@vger.kernel.org
Subject: Re: Problem hotplugging USB flashdrive (race?)
Date: Thu, 18 Dec 2003 18:04:20 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-107177119314165@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-107132041630956@msgid-missing>
[-- Attachment #1: Type: text/plain, Size: 1143 bytes --]
On Thu, Dec 18, 2003 at 09:53:03AM +0100, Oliver Neukum wrote:
> Am Mittwoch, 17. Dezember 2003 18:47 schrieb Greg KH:
> > On Wed, Dec 17, 2003 at 06:28:13PM +0100, Bertrik Sikken wrote:
> > > >Exactly. Try putting a sleep before reading the file, or loop on the
> > > >file for a bit before reading it.
> > >
> > > I can confirm that the sleep works (added a sleep 1 at the start
> > > of the script). Does this suggest an issue in the kernel?
> >
> > No, it's not a problem with the kernel, it's just something that you
> > need to be aware of in your hotplug scripts.
>
> Technically, it is a race condition.
> You need to make sure that user space loses the race.
Shouldn't this actually be two separate hotplug events?
One when the unit is physically attached, to load the usb-storage driver.
The second when the SCSI layer has initalized the device, to run the
scsi.agent?
Matt
--
Matthew Dharm Home: mdharm-usb@one-eyed-alien.net
Maintainer, Linux USB Mass Storage Driver
A female who groks UNIX? My universe is collapsing.
-- Mike
User Friendly, 10/11/1998
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2003-12-18 18:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-13 12:58 Problem hotplugging USB flashdrive (race?) Bertrik Sikken
2003-12-15 22:01 ` Greg KH
2003-12-17 17:28 ` Bertrik Sikken
2003-12-17 17:47 ` Greg KH
2003-12-18 8:53 ` Oliver Neukum
2003-12-18 18:04 ` Matthew Dharm [this message]
2003-12-18 21:13 ` Greg KH
2004-01-02 13:26 ` Olaf Hering
2004-01-05 23:47 ` Olaf Hering
2004-01-07 18:29 ` Patrick Mansfield
2004-01-07 18:32 ` Olaf Hering
2004-01-07 20:01 ` Olaf Hering
2004-01-07 20:37 ` Olaf Hering
2004-02-01 22:48 ` Olaf Hering
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=marc-linux-hotplug-107177119314165@msgid-missing \
--to=mdharm-usb@one-eyed-alien.net \
--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).