[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-27cf929845b10043f2257693c7d179a9e0b1980e@git.kernel.org>
Date: Wed, 20 Feb 2013 05:59:22 -0800
From: tip-bot for Mathias Krause <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
pageexec@...email.hu, minipli@...glemail.com,
suresh.b.siddha@...el.com, tglx@...utronix.de, rientjes@...gle.com
Subject: [tip:x86/urgent] x86/apic: Fix parsing of the 'lapic'
cmdline option
Commit-ID: 27cf929845b10043f2257693c7d179a9e0b1980e
Gitweb: http://git.kernel.org/tip/27cf929845b10043f2257693c7d179a9e0b1980e
Author: Mathias Krause <minipli@...glemail.com>
AuthorDate: Tue, 19 Feb 2013 20:47:07 +0100
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 20 Feb 2013 11:24:36 +0100
x86/apic: Fix parsing of the 'lapic' cmdline option
Including " lapic " in the kernel cmdline on an x86-64 kernel
makes it panic while parsing early params -- e.g. with no user
visible output.
Fix this bug by ensuring arg is non-NULL before passing it to
strncmp().
Reported-by: PaX Team <pageexec@...email.hu>
Signed-off-by: Mathias Krause <minipli@...glemail.com>
Acked-by: David Rientjes <rientjes@...gle.com>
Cc: Suresh Siddha <suresh.b.siddha@...el.com>
Link: http://lkml.kernel.org/r/1361303227-13174-1-git-send-email-minipli@googlemail.com
Cc: stable@...r.kernel.org # v3.8
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/kernel/apic/apic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index a5b4dce..904611b 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -131,7 +131,7 @@ static int __init parse_lapic(char *arg)
{
if (config_enabled(CONFIG_X86_32) && !arg)
force_enable_local_apic = 1;
- else if (!strncmp(arg, "notscdeadline", 13))
+ else if (arg && !strncmp(arg, "notscdeadline", 13))
setup_clear_cpu_cap(X86_FEATURE_TSC_DEADLINE_TIMER);
return 0;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists