From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Neukum Date: Fri, 09 Feb 2001 13:09:39 +0000 Subject: Re: Adding PCMCIA support to the kernel tree -- developers needed. Message-Id: 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 > > You can retry, you are right. I failed to see that. > > But you seem to suffer from the name reuse race. > > > > reality task A task B > > plug in dev A > > bind dev A to name 0 > > unplug dev A > > unbind name 0 > > plug in dev B > > bind dev B to name 0 > > do something arbitrary > > to the dev associated > > with name 0 > > > > If the kernel would select name 0, it could lock on name 0. > > With your scheme this is hard to do. > > Unbind on name 0 should block until task A finishes the arbitrary stuff. > Is there any problem with that? We could even have a 'setup finished' > ioctl for this, though I think I'd prefer just having one task per action. This would work provided that the lock is taken atomically with binding to the name. > > Nor do you absolutely need to. > > You can already rename network devices by ioctl. > > For everything else a humble symlink should do the job, shouldn't it ? > > Yes, but with humble symlinks you will run out of minor/major numbers soon. Why is that ? Even if you assign numbers by the agent you would take them out of a pool of numbers the kernel could also use. In both cases it would seem that devices use the same amount of numbers. > > Else you introduce complexity without much gain. > > And you need renaming in any case, as device names may have been assigned > > during boot. > > Yes. Symlinks would help here, however, you'd probably need devfs in > that case. I can see devfs helping tremendously with providing stable names, but why is it necessary ? Regards Oliver _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel