Commit 6a0e29ef authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] remount: mount flags filtering

 - we could pass MS_ACTIVE in mount flags and it would be passed into
   ->get_sb(), leading to interesting failure modes.  This flag is only
   for internal use (it's set once fill_super is complete and reset
   before the inode eviction on umount); made sure that we never get
   tricked into having it set it too early.
parent 8636df83
......@@ -777,7 +777,7 @@ long do_mount(char * dev_name, char * dir_name, char *type_page,
mnt_flags |= MNT_NODEV;
if (flags & MS_NOEXEC)
mnt_flags |= MNT_NOEXEC;
flags &= ~(MS_NOSUID|MS_NOEXEC|MS_NODEV);
flags &= ~(MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_ACTIVE);
/* ... and get the mountpoint */
retval = path_lookup(dir_name, LOOKUP_FOLLOW, &nd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment