From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kay Sievers" Date: Fri, 23 Mar 2007 16:26:48 +0000 Subject: Re: [PATCH] udevsettle should read udev not kernel seqnum first Message-Id: <3ae72650703230926u317a7709i93ce947ff1b2297f@mail.gmail.com> List-Id: References: <20070323144655.GD30083@ojjektum.uhulinux.hu> In-Reply-To: <20070323144655.GD30083@ojjektum.uhulinux.hu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org On 3/23/07, Pozsar Balazs wrote: > I think that the order of reading the kernel and udev seqnum files > should be: first udev, then kernel, because with the current code > there's a chance of exiting too early, for example in the following > scenario: > 1. kernel seqnum is X, udevsettle reads it > 2. udev finishes processing the event X, which generates new events > (for example a modprobe), udev seqnum becomes X > 3. udevsettle reads the udev seqnum which is X now, so it exits > 4. at least another event comes which should have been waited for Makes sense. I've applied this. Note, that the kernel interaction is async, and the device creation in the kernel is threaded, it can always happen that there is currently no pending uevent in the kernel, even when udev has triggered a device creation, an it just happens shortly after udevsettle "thinks", that there is nothing left to wait for. Thanks, Kay ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=DEVD= EV _______________________________________________ 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