summaryrefslogtreecommitdiffstats
path: root/mnt-Implicitly-add-MNT_NODEV-on-remount-when-it-was-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'mnt-Implicitly-add-MNT_NODEV-on-remount-when-it-was-.patch')
-rw-r--r--mnt-Implicitly-add-MNT_NODEV-on-remount-when-it-was-.patch41
1 files changed, 0 insertions, 41 deletions
diff --git a/mnt-Implicitly-add-MNT_NODEV-on-remount-when-it-was-.patch b/mnt-Implicitly-add-MNT_NODEV-on-remount-when-it-was-.patch
deleted file mode 100644
index 0fff15128..000000000
--- a/mnt-Implicitly-add-MNT_NODEV-on-remount-when-it-was-.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From: "Eric W. Biederman" <ebiederm@xmission.com>
-Date: Wed, 13 Aug 2014 01:33:38 -0700
-Subject: [PATCH] mnt: Implicitly add MNT_NODEV on remount when it was
- implicitly added by mount
-
-Now that remount is properly enforcing the rule that you can't remove
-nodev at least sandstorm.io is breaking when performing a remount.
-
-It turns out that there is an easy intuitive solution implicitly
-add nodev on remount when nodev was implicitly added on mount.
-
-Tested-by: Cedric Bosdonnat <cbosdonnat@suse.com>
-Tested-by: Richard Weinberger <richard@nod.at>
-Cc: stable@vger.kernel.org
-Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
----
- fs/namespace.c | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/fs/namespace.c b/fs/namespace.c
-index 5b66b2b3624d..3a1a87dc33df 100644
---- a/fs/namespace.c
-+++ b/fs/namespace.c
-@@ -2098,7 +2098,13 @@ static int do_remount(struct path *path, int flags, int mnt_flags,
- }
- if ((mnt->mnt.mnt_flags & MNT_LOCK_NODEV) &&
- !(mnt_flags & MNT_NODEV)) {
-- return -EPERM;
-+ /* Was the nodev implicitly added in mount? */
-+ if ((mnt->mnt_ns->user_ns != &init_user_ns) &&
-+ !(sb->s_type->fs_flags & FS_USERNS_DEV_MOUNT)) {
-+ mnt_flags |= MNT_NODEV;
-+ } else {
-+ return -EPERM;
-+ }
- }
- if ((mnt->mnt.mnt_flags & MNT_LOCK_NOSUID) &&
- !(mnt_flags & MNT_NOSUID)) {
---
-2.1.0
-