Subject: Re: kern/29898: mount(2) can corrupt filesystem
To: None <yamt@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: netbsd-bugs
Date: 04/06/2005 14:24:01
The following reply was made to PR kern/29898; it has been noted by GNATS.
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
To: christos@zoulas.com
Cc: gnats-bugs@netbsd.org, kern-bug-people@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: kern/29898: mount(2) can corrupt filesystem
Date: Wed, 06 Apr 2005 23:23:20 +0900
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