rpms/kernel/F-11 fix-crash-with-sys_move_pages.patch, NONE, 1.1.2.2 kernel.spec, 1.1784.2.17, 1.1784.2.18
Kyle McMartin
kyle at fedoraproject.org
Sun Feb 7 03:17:55 UTC 2010
Author: kyle
Update of /cvs/pkgs/rpms/kernel/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6026
Modified Files:
Tag: private-fedora-11-2_6_30
kernel.spec
Added Files:
Tag: private-fedora-11-2_6_30
fix-crash-with-sys_move_pages.patch
Log Message:
* Sat Feb 06 2010 Kyle McMartin <kyle at redhat.com> 2.6.30.10-105.2.18
- 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(-)
--- NEW FILE fix-crash-with-sys_move_pages.patch ---
>From 187dad5d799f33a32e2063254b74a0911f41b618 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 068655d..3b4db69 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -935,6 +935,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-11/kernel.spec,v
retrieving revision 1.1784.2.17
retrieving revision 1.1784.2.18
diff -u -p -r1.1784.2.17 -r1.1784.2.18
--- kernel.spec 4 Feb 2010 23:04:00 -0000 1.1784.2.17
+++ kernel.spec 7 Feb 2010 03:17:54 -0000 1.1784.2.18
@@ -888,6 +888,8 @@ Patch16533: sparc-tif_abi_pending-bit-re
Patch16534: x86-get-rid-of-the-insane-tif_abi_pending-bit.patch
Patch16535: powerpc-tif_abi_pending-bit-removal.patch
+Patch16540: fix-crash-with-sys_move_pages.patch
+
%endif
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1670,6 +1672,8 @@ ApplyPatch sparc-tif_abi_pending-bit-rem
ApplyPatch x86-get-rid-of-the-insane-tif_abi_pending-bit.patch
ApplyPatch powerpc-tif_abi_pending-bit-removal.patch
+ApplyPatch fix-crash-with-sys_move_pages.patch
+
# END OF PATCH APPLICATIONS
%endif
@@ -2258,6 +2262,10 @@ fi
# and build.
%changelog
+* Sat Feb 06 2010 Kyle McMartin <kyle at redhat.com> 2.6.30.10-105.2.18
+- fix-crash-with-sys_move_pages.patch: sys_move_pages doesn't bounds
+ check the node properly.
+
* Thu Feb 04 2010 Chuck Ebbert <cebbert at redhat.com> 2.6.30.10-105.2.17
- Remove obsolete config options (generated .configs are unchanged.)
More information about the scm-commits
mailing list