Subject: Re: kern/29898: mount(2) can corrupt filesystem
To: None <christos@zoulas.com>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: netbsd-bugs
Date: 04/06/2005 23:23:20
hi,
> | restructure mount related code so that the caller of
> | VFS_MOUNT doesn't need to alter mnt_flag/iflag.
> | maybe by adding more arguments to VFS_MOUNT to describe the operation.
>
> Isn't is as simple as doing:
well, while i've committed the similar change,
i don't think it's that simple. it isn't MNT_GETARGS specific.
eg. consider updating !MNT_SOFTDEP to MNT_SOFTDEP.
until ffs_mount notices the attempt and prevents it by setting MNT_SOFTDEP,
MNT_SOFTDEP is left cleared.
i think either of the following is needed.
- change VFS_MOUNT as i suggested above.
- don't share mnt_flag between filesystem independent code and
filesystem code.
YAMAMOTO Takashi