Subject: + initmpfs-replace-ms_nouser-in-initramfs.patch added to -mm tree To: rob@xxxxxxxxxxx,axboe@xxxxxxxxx,ebiederm@xxxxxxxxxxxx,gregkh@xxxxxxxxxxxxxxxxxxx,hpa@xxxxxxxxx,jim.cromie@xxxxxxxxx,jlayton@xxxxxxxxxx,rusty@xxxxxxxxxxxxxxx,sam@xxxxxxxxxxxx,swarren@xxxxxxxxxx,viro@xxxxxxxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Fri, 19 Jul 2013 12:57:47 -0700 The patch titled Subject: initmpfs: replace MS_NOUSER in initramfs has been added to the -mm tree. Its filename is initmpfs-replace-ms_nouser-in-initramfs.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/initmpfs-replace-ms_nouser-in-initramfs.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/initmpfs-replace-ms_nouser-in-initramfs.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Rob Landley <rob@xxxxxxxxxxx> Subject: initmpfs: replace MS_NOUSER in initramfs Mounting MS_NOUSER prevents --bind mounts from rootfs. Prevent new rootfs mounts with a different mechanism that doesn't affect bind mounts. Signed-off-by: Rob Landley <rob@xxxxxxxxxxx> Cc: Jeff Layton <jlayton@xxxxxxxxxx> Cc: Jens Axboe <axboe@xxxxxxxxx> Cc: Stephen Warren <swarren@xxxxxxxxxx> Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx> Cc: Jim Cromie <jim.cromie@xxxxxxxxx> Cc: Sam Ravnborg <sam@xxxxxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx> Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ramfs/inode.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff -puN fs/ramfs/inode.c~initmpfs-replace-ms_nouser-in-initramfs fs/ramfs/inode.c --- a/fs/ramfs/inode.c~initmpfs-replace-ms_nouser-in-initramfs +++ a/fs/ramfs/inode.c @@ -247,7 +247,12 @@ struct dentry *ramfs_mount(struct file_s static struct dentry *rootfs_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) { - return mount_nodev(fs_type, flags|MS_NOUSER, data, ramfs_fill_super); + static unsigned long once; + + if (test_and_set_bit(1, &once)) + return ERR_PTR(-ENODEV); + + return mount_nodev(fs_type, flags, data, ramfs_fill_super); } static void ramfs_kill_sb(struct super_block *sb) _ Patches currently in -mm which might be from rob@xxxxxxxxxxx are x86-make-mem=-option-to-work-for-efi-platform.patch initmpfs-replace-ms_nouser-in-initramfs.patch initmpfs-move-bdi-setup-from-init_rootfs-to-init_ramfs.patch initmpfs-move-bdi-setup-from-init_rootfs-to-init_ramfs-fix.patch initmpfs-move-rootfs-code-from-fs-ramfs-to-init.patch initmpfs-make-rootfs-use-tmpfs-when-config_tmpfs-enabled.patch initmpfs-use-initramfs-if-rootfstype=-or-root=-specified.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html