3.8-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Mathias Krause <mini...@googlemail.com>

commit 27cf929845b10043f2257693c7d179a9e0b1980e upstream.

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 <pagee...@freemail.hu>
Signed-off-by: Mathias Krause <mini...@googlemail.com>
Acked-by: David Rientjes <rient...@google.com>
Cc: Suresh Siddha <suresh.b.sid...@intel.com>
Link: 
http://lkml.kernel.org/r/1361303227-13174-1-git-send-email-mini...@googlemail.com
Signed-off-by: Ingo Molnar <mi...@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>

---
 arch/x86/kernel/apic/apic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 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 stable" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to