]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
2 more .27 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 1 Jul 2009 18:34:08 +0000 (11:34 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 1 Jul 2009 18:34:08 +0000 (11:34 -0700)
queue-2.6.27/bsdacct-fix-access-to-invalid-filp-in-acct_on.patch [new file with mode: 0644]
queue-2.6.27/kbuild-fix-c-libary-confusion-in-unifdef.c-due-to-getline.patch [new file with mode: 0644]
queue-2.6.27/series

diff --git a/queue-2.6.27/bsdacct-fix-access-to-invalid-filp-in-acct_on.patch b/queue-2.6.27/bsdacct-fix-access-to-invalid-filp-in-acct_on.patch
new file mode 100644 (file)
index 0000000..825f76f
--- /dev/null
@@ -0,0 +1,51 @@
+From df279ca8966c3de83105428e3391ab17690802a9 Mon Sep 17 00:00:00 2001
+From: Renaud Lottiaux <renaud.lottiaux@kerlabs.com>
+Date: Tue, 30 Jun 2009 11:41:34 -0700
+Subject: bsdacct: fix access to invalid filp in acct_on()
+
+From: Renaud Lottiaux <renaud.lottiaux@kerlabs.com>
+
+commit df279ca8966c3de83105428e3391ab17690802a9 upstream.
+
+The file opened in acct_on and freshly stored in the ns->bacct struct can
+be closed in acct_file_reopen by a concurrent call after we release
+acct_lock and before we call mntput(file->f_path.mnt).
+
+Record file->f_path.mnt in a local variable and use this variable only.
+
+Signed-off-by: Renaud Lottiaux <renaud.lottiaux@kerlabs.com>
+Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com>
+Cc: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/acct.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/kernel/acct.c
++++ b/kernel/acct.c
+@@ -215,6 +215,7 @@ static void acct_file_reopen(struct bsd_
+ static int acct_on(char *name)
+ {
+       struct file *file;
++      struct vfsmount *mnt;
+       int error;
+       struct pid_namespace *ns;
+       struct bsd_acct_struct *acct = NULL;
+@@ -256,11 +257,12 @@ static int acct_on(char *name)
+               acct = NULL;
+       }
+-      mnt_pin(file->f_path.mnt);
++      mnt = file->f_path.mnt;
++      mnt_pin(mnt);
+       acct_file_reopen(ns->bacct, file, ns);
+       spin_unlock(&acct_lock);
+-      mntput(file->f_path.mnt); /* it's pinned, now give up active reference */
++      mntput(mnt); /* it's pinned, now give up active reference */
+       kfree(acct);
+       return 0;
diff --git a/queue-2.6.27/kbuild-fix-c-libary-confusion-in-unifdef.c-due-to-getline.patch b/queue-2.6.27/kbuild-fix-c-libary-confusion-in-unifdef.c-due-to-getline.patch
new file mode 100644 (file)
index 0000000..412dd78
--- /dev/null
@@ -0,0 +1,58 @@
+From d15bd1067b1fcb2b7250d22bc0c7c7fea0b759f7 Mon Sep 17 00:00:00 2001
+From: Justin P. Mattock <justinmattock@gmail.com>
+Date: Sat, 7 Mar 2009 13:31:29 +0100
+Subject: kbuild: fix C libary confusion in unifdef.c due to getline()
+
+From: Justin P. Mattock <justinmattock@gmail.com>
+
+commit d15bd1067b1fcb2b7250d22bc0c7c7fea0b759f7 upstream.
+
+This fixes an error when compiling the kernel.
+
+  CHK     include/linux/version.h
+  HOSTCC  scripts/unifdef
+scripts/unifdef.c:209: error: conflicting types for 'getline'
+/usr/include/stdio.h:651: note: previous declaration of 'getline' was here
+make[1]: *** [scripts/unifdef] Error 1
+make: *** [__headers] Error 2
+
+Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
+Cc:  Frederic Weisbecker <fweisbec@gmail.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
+Cc: Gilles Espinasse <g.esp@free.fr>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ scripts/unifdef.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/scripts/unifdef.c
++++ b/scripts/unifdef.c
+@@ -206,7 +206,7 @@ static void             done(void);
+ static void             error(const char *);
+ static int              findsym(const char *);
+ static void             flushline(bool);
+-static Linetype         getline(void);
++static Linetype         get_line(void);
+ static Linetype         ifeval(const char **);
+ static void             ignoreoff(void);
+ static void             ignoreon(void);
+@@ -512,7 +512,7 @@ process(void)
+       for (;;) {
+               linenum++;
+-              lineval = getline();
++              lineval = get_line();
+               trans_table[ifstate[depth]][lineval]();
+               debug("process %s -> %s depth %d",
+                   linetype_name[lineval],
+@@ -526,7 +526,7 @@ process(void)
+  * help from skipcomment().
+  */
+ static Linetype
+-getline(void)
++get_line(void)
+ {
+       const char *cp;
+       int cursym;
index 95010f00486a729daaea8d3f1c5ddd903b3fd7b7..ae6ee591a9bac0088ef04289a1f1c580057cd84e 100644 (file)
@@ -28,3 +28,5 @@ mm-fix-handling-of-pagesets-for-downed-cpus.patch
 dm-mpath-validate-hw_handler-argument-count.patch
 dm-mpath-validate-table-argument-count.patch
 dm-sysfs-skip-output-when-device-is-being-destroyed.patch
+bsdacct-fix-access-to-invalid-filp-in-acct_on.patch
+kbuild-fix-c-libary-confusion-in-unifdef.c-due-to-getline.patch