rpms/kernel/F-12 fix-crash-with-sys_move_pages.patch, 1.1, 1.2 kernel.spec, 1.2005, 1.2006
Kyle McMartin
kyle at fedoraproject.org
Sun Feb 7 03:19:47 UTC 2010
Author: kyle
Update of /cvs/pkgs/rpms/kernel/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6281
Modified Files:
kernel.spec
Added Files:
fix-crash-with-sys_move_pages.patch
Log Message:
* Sat Feb 06 2010 Kyle McMartin <kyle at redhat.com> 2.6.32.8-46.rc2
- fix-crash-with-sys_move_pages.patch: sys_move_pages doesn't bounds
check the node properly.
fix-crash-with-sys_move_pages.patch:
migrate.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: fix-crash-with-sys_move_pages.patch
===================================================================
RCS file: fix-crash-with-sys_move_pages.patch
diff -N fix-crash-with-sys_move_pages.patch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ fix-crash-with-sys_move_pages.patch 7 Feb 2010 03:19:47 -0000 1.2
@@ -0,0 +1,36 @@
+From 28e143c081f5f2aa55f2f1f15810f009540a1e4d Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds at linux-foundation.org>
+Date: Fri, 5 Feb 2010 16:16:50 -0800
+Subject: Fix potential crash with sys_move_pages
+
+We incorrectly depended on the 'node_state/node_isset()' functions
+testing the node range, rather than checking it explicitly. That's not
+reliable, even if it might often happen to work. So do the proper
+explicit test.
+
+Reported-by: Marcus Meissner <meissner at suse.de>
+Acked-and-tested-by: Brice Goglin <Brice.Goglin at inria.fr>
+Acked-by: Hugh Dickins <hugh.dickins at tiscali.co.uk>
+Cc: stable at kernel.org
+Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
+---
+ mm/migrate.c | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/mm/migrate.c b/mm/migrate.c
+index 7dbcb22..0e39f94 100644
+--- a/mm/migrate.c
++++ b/mm/migrate.c
+@@ -953,6 +953,9 @@ static int do_pages_move(struct mm_struct *mm, struct task_struct *task,
+ goto out_pm;
+
+ err = -ENODEV;
++ if (node < 0 || node >= MAX_NUMNODES)
++ goto out_pm;
++
+ if (!node_state(node, N_HIGH_MEMORY))
+ goto out_pm;
+
+--
+1.6.6
+
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/kernel.spec,v
retrieving revision 1.2005
retrieving revision 1.2006
diff -u -p -r1.2005 -r1.2006
--- kernel.spec 5 Feb 2010 18:08:00 -0000 1.2005
+++ kernel.spec 7 Feb 2010 03:19:47 -0000 1.2006
@@ -755,6 +755,8 @@ Patch12200: add-appleir-usb-driver.patch
Patch12301: fix-conntrack-bug-with-namespaces.patch
Patch12302: prevent-runtime-conntrack-changes.patch
+Patch12310: fix-crash-with-sys_move_pages.patch
+
# ==============================================================================
%endif
@@ -1387,6 +1389,8 @@ ApplyPatch wmi-check-wmi-get-event-data-
ApplyPatch fix-conntrack-bug-with-namespaces.patch
ApplyPatch prevent-runtime-conntrack-changes.patch
+ApplyPatch fix-crash-with-sys_move_pages.patch
+
# END OF PATCH APPLICATIONS ====================================================
%endif
@@ -2042,6 +2046,10 @@ fi
# and build.
%changelog
+* Sat Feb 06 2010 Kyle McMartin <kyle at redhat.com> 2.6.32.8-46.rc2
+- fix-crash-with-sys_move_pages.patch: sys_move_pages doesn't bounds
+ check the node properly.
+
* Fri Feb 05 2010 Chuck Ebbert <cebbert at redhat.com> 2.6.32.8-45.rc2
- Linux 2.6.32.8-rc2
- Drop fix-net-restore-ip-source-validation.patch
More information about the scm-commits
mailing list