Re: MMC block major dev

From: Russell King
Date: Wed Sep 01 2004 - 17:15:36 EST


On Wed, Sep 01, 2004 at 01:16:30PM +0100, Alan Cox wrote:
> On Maw, 2004-08-31 at 20:47, Pierre Ossman wrote:
> > >Registering with the block layer with a major number of zero means
> > >"find me a free major number and assign that to me." This is nothing
> > >new. If devfs can't cope with that, devfs is buggy. Use udev instead.
>
> Registering with an ID of 0 is bad because you've no idea what existing
> device node you may reallocate and thus what permissions may be present
> for access unless you sweep all of storage.

Surely the same arguments also apply to character drivers as well?

>From what you're saying, any use of these dynamic majors what so
ever is buggy. So WTF do we have this facility in the kernel in
the first place?

What about dynamically assigning physical serial ports to ttyS
numbers? I suggest that your argument also applies there as well.
Also to SCSI disks, where if you load SCSI driver modules in a
differnet order your disks all move about. It's all the same
problem.


I suggest that someone submits a patch to rip out this apparantly
buggy and useless feature, or at least make the kernel print a
warning when its used such that people are aware of its dangerous
nature.

Of course, if you do rip out dynamic majors then you _will_ need
to have an assigned major number for PCMCIA driver services, and
probably a bunch of other stuff.

I also seem to remember hearing that we will only be using dynamically
assigned device numbers in the new expanded device space.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/