* [PATCH] x86: apic: Fix parsing of lapic cmdline option
@ 2013-02-19 19:47 Mathias Krause
2013-02-19 21:04 ` David Rientjes
2013-02-20 13:59 ` [tip:x86/urgent] x86/apic: Fix parsing of the 'lapic' " tip-bot for Mathias Krause
0 siblings, 2 replies; 3+ messages in thread
From: Mathias Krause @ 2013-02-19 19:47 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin
Cc: Suresh Siddha, PaX Team, x86, linux-kernel, Mathias Krause
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().
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Reported-by: PaX Team <pageexec@freemail.hu>
Cc: stable@vger.kernel.org # v3.8
---
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 b994cc8..cbf5121 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;
}
--
1.7.10.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86: apic: Fix parsing of lapic cmdline option
2013-02-19 19:47 [PATCH] x86: apic: Fix parsing of lapic cmdline option Mathias Krause
@ 2013-02-19 21:04 ` David Rientjes
2013-02-20 13:59 ` [tip:x86/urgent] x86/apic: Fix parsing of the 'lapic' " tip-bot for Mathias Krause
1 sibling, 0 replies; 3+ messages in thread
From: David Rientjes @ 2013-02-19 21:04 UTC (permalink / raw)
To: Mathias Krause
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Suresh Siddha,
PaX Team, x86, linux-kernel
On Tue, 19 Feb 2013, Mathias Krause wrote:
> 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().
>
> Signed-off-by: Mathias Krause <minipli@googlemail.com>
> Reported-by: PaX Team <pageexec@freemail.hu>
> Cc: stable@vger.kernel.org # v3.8
Acked-by: David Rientjes <rientjes@google.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:x86/urgent] x86/apic: Fix parsing of the 'lapic' cmdline option
2013-02-19 19:47 [PATCH] x86: apic: Fix parsing of lapic cmdline option Mathias Krause
2013-02-19 21:04 ` David Rientjes
@ 2013-02-20 13:59 ` tip-bot for Mathias Krause
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Mathias Krause @ 2013-02-20 13:59 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, pageexec, minipli, suresh.b.siddha,
tglx, rientjes
Commit-ID: 27cf929845b10043f2257693c7d179a9e0b1980e
Gitweb: http://git.kernel.org/tip/27cf929845b10043f2257693c7d179a9e0b1980e
Author: Mathias Krause <minipli@googlemail.com>
AuthorDate: Tue, 19 Feb 2013 20:47:07 +0100
Committer: Ingo Molnar <mingo@kernel.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@freemail.hu>
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Link: http://lkml.kernel.org/r/1361303227-13174-1-git-send-email-minipli@googlemail.com
Cc: stable@vger.kernel.org # v3.8
Signed-off-by: Ingo Molnar <mingo@kernel.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;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-02-20 14:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-19 19:47 [PATCH] x86: apic: Fix parsing of lapic cmdline option Mathias Krause
2013-02-19 21:04 ` David Rientjes
2013-02-20 13:59 ` [tip:x86/urgent] x86/apic: Fix parsing of the 'lapic' " tip-bot for Mathias Krause
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®