r2513 - in trunk/kernel/source: kernel-source-2.6.8-2.6.8/debian/patches kernel-source-2.6.9-2.6.9/debian/patches
Joshua Kwan
joshk@costa.debian.org
Thu, 17 Feb 2005 21:44:38 +0100
Author: joshk
Date: 2005-02-17 21:44:37 +0100 (Thu, 17 Feb 2005)
New Revision: 2513
Modified:
trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/proc-cmdline-mmput-leak.dpatch
trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/patches/proc-cmdline-mmput-leak.dpatch
Log:
fix the patch
Modified: trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/proc-cmdline-mmput-leak.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/proc-cmdline-mmput-leak.dpatch 2005-02-17 20:30:07 UTC (rev 2512)
+++ trunk/kernel/source/kernel-source-2.6.8-2.6.8/debian/patches/proc-cmdline-mmput-leak.dpatch 2005-02-17 20:44:37 UTC (rev 2513)
@@ -1,5 +1,6 @@
# origin: bk
-# key: 41a2172dHEUBTuxDtKQTo13Pc2wZsQ (linux-2.5)
+# key: 412a4baaEebwtKg-X7sS2r5Mua6uGw (linux-2.5)
+# 41a2172dHEUBTuxDtKQTo13Pc2wZsQ (linux-2.5)
# description: fix cmdline race that could allow users to read new process data
# inclusion: 2.6.10 (backport)
# revision date: 2005-02-17
@@ -21,18 +22,17 @@
# /proc/cmdline missing mmput
#
diff -Nru a/fs/proc/base.c b/fs/proc/base.c
---- a/fs/proc/base.c 2005-02-17 12:26:02 -08:00
-+++ b/fs/proc/base.c 2005-02-17 12:26:02 -08:00
-@@ -343,7 +343,7 @@
+--- a/fs/proc/base.c 2005-02-17 12:35:57 -08:00
++++ b/fs/proc/base.c 2005-02-17 12:35:57 -08:00
+@@ -343,5 +343,7 @@
if (!mm)
goto out;
- if (!mm->arg_end)
-- goto out; /* Shh! No looking before we're done */
++ if (!mm->arg_end)
+ goto out_mm; /* Shh! No looking before we're done */
len = mm->arg_end - mm->arg_start;
-@@ -366,8 +366,8 @@
+@@ -366,8 +368,8 @@
res = strnlen(buffer, res);
}
}
Modified: trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/patches/proc-cmdline-mmput-leak.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/patches/proc-cmdline-mmput-leak.dpatch 2005-02-17 20:30:07 UTC (rev 2512)
+++ trunk/kernel/source/kernel-source-2.6.9-2.6.9/debian/patches/proc-cmdline-mmput-leak.dpatch 2005-02-17 20:44:37 UTC (rev 2513)
@@ -1,5 +1,6 @@
# origin: bk
-# key: 41a2172dHEUBTuxDtKQTo13Pc2wZsQ (linux-2.5)
+# key: 412a4baaEebwtKg-X7sS2r5Mua6uGw (linux-2.5)
+# 41a2172dHEUBTuxDtKQTo13Pc2wZsQ (linux-2.5)
# description: fix cmdline race that could allow users to read new process data
# inclusion: 2.6.10 (backport)
# revision date: 2005-02-17
@@ -7,6 +8,34 @@
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
+# 2004/08/23 12:55:22-07:00 rl@hellgate.ch
+# [PATCH] proc_pid_cmdline() race fix
+#
+# If you win the race with a starting process, you can read its environment.
+#
+# Signed-off-by: Andrew Morton <akpm@osdl.org>
+# Signed-off-by: Linus Torvalds <torvalds@osdl.org>
+#
+# fs/proc/base.c
+# 2004/08/23 01:15:09-07:00 rl@hellgate.ch +2 -0
+# proc_pid_cmdline() race fix
+#
+diff -Nru a/fs/proc/base.c b/fs/proc/base.c
+--- a/fs/proc/base.c 2005-02-17 12:35:46 -08:00
++++ b/fs/proc/base.c 2005-02-17 12:35:46 -08:00
+@@ -328,6 +328,8 @@
+ struct mm_struct *mm = get_task_mm(task);
+ if (!mm)
+ goto out;
++ if (!mm->arg_end)
++ goto out; /* Shh! No looking before we're done */
+
+ len = mm->arg_end - mm->arg_start;
+
+
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
# 2004/11/22 08:43:25-08:00 pmeda@akamai.com
# [PATCH] /proc/cmdline missing mmput
#
@@ -21,8 +50,8 @@
# /proc/cmdline missing mmput
#
diff -Nru a/fs/proc/base.c b/fs/proc/base.c
---- a/fs/proc/base.c 2005-02-17 12:26:02 -08:00
-+++ b/fs/proc/base.c 2005-02-17 12:26:02 -08:00
+--- a/fs/proc/base.c 2005-02-17 12:35:57 -08:00
++++ b/fs/proc/base.c 2005-02-17 12:35:57 -08:00
@@ -343,7 +343,7 @@
if (!mm)
goto out;