]> git.pld-linux.org Git - packages/kernel.git/commitdiff
- always apply mount options when mounting /proc
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 23 Mar 2012 18:45:45 +0000 (18:45 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    kernel-small_fixes.patch -> 1.58

kernel-small_fixes.patch

index 77e162d0df7b8fdc4f4000caa1c2a20a6daea9a1..248dc4d6ceb934bd4ae4ecb7976c6bd58e49357f 100644 (file)
@@ -127,3 +127,43 @@ Please read the FAQ at  http://www.tux.org/lkml/
 
 
 
+From: Vasiliy Kulikov <segoon@openwall.com>
+Date: Fri, 23 Mar 2012 20:56:42 +0400
+Subject: [PATCH] proc: fix mount -t proc -o AAA
+
+proc_parse_options() inside of proc_mount() runs only once at the boot
+time without any given options.  So, following umount(2)+mount(2) ignore
+mount options: proc_parse_options() is not called as ->s_root is already
+initialized.  To fix that parse mount options unconditionally.
+
+Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
+Reported-by: Arkadiusz Miśkiewicz <a.miskiewicz@gmail.com>
+---
+ fs/proc/root.c |    9 +++++----
+ 1 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/fs/proc/root.c b/fs/proc/root.c
+index 46a15d8..eed44bf 100644
+--- a/fs/proc/root.c
++++ b/fs/proc/root.c
+@@ -115,12 +115,13 @@ static struct dentry *proc_mount(struct file_system_type *fs_type,
+       if (IS_ERR(sb))
+               return ERR_CAST(sb);
++      if (!proc_parse_options(options, ns)) {
++              deactivate_locked_super(sb);
++              return ERR_PTR(-EINVAL);
++      }
++
+       if (!sb->s_root) {
+               sb->s_flags = flags;
+-              if (!proc_parse_options(options, ns)) {
+-                      deactivate_locked_super(sb);
+-                      return ERR_PTR(-EINVAL);
+-              }
+               err = proc_fill_super(sb);
+               if (err) {
+                       deactivate_locked_super(sb);
+-- 
+1.7.0.4
+
This page took 0.06349 seconds and 4 git commands to generate.