Subject: Re: kern/29898: mount(2) can corrupt filesystem
To: None <yamt@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: netbsd-bugs
Date: 04/06/2005 14:33:01
The following reply was made to PR kern/29898; it has been noted by GNATS.
From: christos@zoulas.com (Christos Zoulas)
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
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, 6 Apr 2005 10:31:58 -0400
On Apr 6, 11:23pm, yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote:
-- Subject: Re: kern/29898: mount(2) can corrupt filesystem
| 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.
This is too intrusive.
| - don't share mnt_flag between filesystem independent code and
| filesystem code.
I think that this is better because then the filesystem specific
code can veto the flag settings before applying them.
christos