From: Greg Kroah-Hartman Date: Wed, 16 Mar 2011 03:42:06 +0000 (-0700) Subject: .38 patches X-Git-Tag: v2.6.37.5~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6f336d9c44d392567d60a57470e382683e817180;p=thirdparty%2Fkernel%2Fstable-queue.git .38 patches --- diff --git a/queue-2.6.38/series b/queue-2.6.38/series index cf577cad51e..7005341f1a9 100644 --- a/queue-2.6.38/series +++ b/queue-2.6.38/series @@ -1,3 +1,5 @@ dcache.c-create-helper-function-for-duplicated-functionality.patch vfs-fix-the-nfs-sillyrename-regression-in-kernel-2.6.38.patch ftrace-fix-memory-leak-with-function-graph-and-cpu-hotplug.patch +x86-fix-panic-when-handling-mem-invalid-param.patch +x86-emit-mem-nopentium-ignored-warning-when-not-supported.patch diff --git a/queue-2.6.38/x86-emit-mem-nopentium-ignored-warning-when-not-supported.patch b/queue-2.6.38/x86-emit-mem-nopentium-ignored-warning-when-not-supported.patch new file mode 100644 index 00000000000..fc1ea2ab8c5 --- /dev/null +++ b/queue-2.6.38/x86-emit-mem-nopentium-ignored-warning-when-not-supported.patch @@ -0,0 +1,45 @@ +From 9a6d44b9adb777ca9549e88cd55bd8f2673c52a2 Mon Sep 17 00:00:00 2001 +From: Kamal Mostafa +Date: Thu, 3 Feb 2011 17:38:05 -0800 +Subject: x86: Emit "mem=nopentium ignored" warning when not supported + +From: Kamal Mostafa + +commit 9a6d44b9adb777ca9549e88cd55bd8f2673c52a2 upstream. + +Emit warning when "mem=nopentium" is specified on any arch other +than x86_32 (the only that arch supports it). + +Signed-off-by: Kamal Mostafa +BugLink: http://bugs.launchpad.net/bugs/553464 +Cc: Yinghai Lu +Cc: Len Brown +Cc: Rafael J. Wysocki +LKML-Reference: <1296783486-23033-2-git-send-email-kamal@canonical.com> +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/e820.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/arch/x86/kernel/e820.c ++++ b/arch/x86/kernel/e820.c +@@ -847,12 +847,15 @@ static int __init parse_memopt(char *p) + if (!p) + return -EINVAL; + +-#ifdef CONFIG_X86_32 + if (!strcmp(p, "nopentium")) { ++#ifdef CONFIG_X86_32 + setup_clear_cpu_cap(X86_FEATURE_PSE); + return 0; +- } ++#else ++ printk(KERN_WARNING "mem=nopentium ignored! (only supported on x86_32)\n"); ++ return -EINVAL; + #endif ++ } + + userdef = 1; + mem_size = memparse(p, &p); diff --git a/queue-2.6.38/x86-fix-panic-when-handling-mem-invalid-param.patch b/queue-2.6.38/x86-fix-panic-when-handling-mem-invalid-param.patch new file mode 100644 index 00000000000..16cdc119c88 --- /dev/null +++ b/queue-2.6.38/x86-fix-panic-when-handling-mem-invalid-param.patch @@ -0,0 +1,38 @@ +From 77eed821accf5dd962b1f13bed0680e217e49112 Mon Sep 17 00:00:00 2001 +From: Kamal Mostafa +Date: Thu, 3 Feb 2011 17:38:04 -0800 +Subject: x86: Fix panic when handling "mem={invalid}" param + +From: Kamal Mostafa + +commit 77eed821accf5dd962b1f13bed0680e217e49112 upstream. + +Avoid removing all of memory and panicing when "mem={invalid}" +is specified, e.g. mem=blahblah, mem=0, or mem=nopentium (on +platforms other than x86_32). + +Signed-off-by: Kamal Mostafa +BugLink: http://bugs.launchpad.net/bugs/553464 +Cc: Yinghai Lu +Cc: Len Brown +Cc: Rafael J. Wysocki +LKML-Reference: <1296783486-23033-1-git-send-email-kamal@canonical.com> +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/e820.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/arch/x86/kernel/e820.c ++++ b/arch/x86/kernel/e820.c +@@ -856,6 +856,9 @@ static int __init parse_memopt(char *p) + + userdef = 1; + mem_size = memparse(p, &p); ++ /* don't remove all of memory when handling "mem={invalid}" param */ ++ if (mem_size == 0) ++ return -EINVAL; + e820_remove_range(mem_size, ULLONG_MAX - mem_size, E820_RAM, 1); + + return 0;