Re: [PATCH] vxfs fix

Andries.Brouwer@cwi.nl
Thu, 2 Aug 2001 20:25:42 GMT


> Let me try again

OK - now I see what you mean, but I think you misunderstand.
The system call mount(2) has an obligatory parameter "type".
The kernel never guesses.

[Apart from the situation at boot time, where it knows the
device and guesses the type. This is bad, and I hope it
will go away. Some types are very difficult to distinguish.]

So, the kernel only does what it is told.

But mount(8) has users, and they are a lazy bunch.
Instead of saying "mount -t iso9660 image /mnt -o loop,ro"
they type "mount image /mnt" and hope that mount(8) can
figure out the rest. And mount(8) knows about the magic numbers
of a handful of filesystems, and if one of these is recognized
it will try that type. Otherwise it will just try all remaining
types in /proc/filesystems. It is this guessing that leads to
crashes in case the kernel succeeds in mounting garbage.

Andries

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/