Subject: Re: support for pre-4.4BSD filesystem broken
To: Matthias Drochner <M.Drochner@fz-juelich.de>
From: Manuel Bouyer <firstname.lastname@example.org>
Date: 12/09/1999 20:03:23
On Thu, Dec 09, 1999 at 07:09:08PM +0100, Matthias Drochner wrote:
> I just found that I can't mount ULTRIX filesystems anymore. There is
> some consistency check which uses a variable which is not initialized at
> this point in case the ffs is an old one:
> fs->fs_cssize > fragroundup(fs, fs->fs_ncg * sizeof(struct csum))
> The fragroundup() macro uses the unintialized fs->fs_qfmask.
> The check went in with that patch:
> revision 1.46
> date: 1998/12/04 11:00:40; author: bouyer; state: Exp; lines: +11 -5
> Sanity check a few values in the superblock, to avoid mallocing huge
> memory area if we try to mount a corrupted filesystem. Fixes kern/3933.
> So - what do do about that? Obviously we have 2 choices:
> a) move the check down
> b) move the ffs_oldfscompat() call up
> b looks easier for me, or am I missing something?
Well, the malloc happens before the call to ffs_oldfscompat() so we would have
to move ffs_oldfscompat() anyway. I can't see any problems in moving the
ffs_oldfscompat() just before the check.
Manuel Bouyer <email@example.com>