[tip:x86/urgent] x86/apic: Fix suspicious RCU usage in smp_trace_call_function_interrupt()
Commit-ID: 7834c10313fb823e538f2772be78edcdeed2e6e3 Gitweb: http://git.kernel.org/tip/7834c10313fb823e538f2772be78edcdeed2e6e3 Author: Dave JonesAuthorDate: Mon, 14 Mar 2016 21:20:54 -0400 Committer: Thomas Gleixner CommitDate: Fri, 18 Mar 2016 14:51:06 +0100 x86/apic: Fix suspicious RCU usage in smp_trace_call_function_interrupt() Since 4.4, I've been able to trigger this occasionally: === [ INFO: suspicious RCU usage. ] 4.5.0-rc7-think+ #3 Not tainted Cc: Andi Kleen Link: http://lkml.kernel.org/r/20160315012054.ga17...@codemonkey.org.uk Signed-off-by: Thomas Gleixner --- ./arch/x86/include/asm/msr-trace.h:47 suspicious rcu_dereference_check() usage! other info that might help us debug this: RCU used illegally from idle CPU! rcu_scheduler_active = 1, debug_locks = 1 RCU used illegally from extended quiescent state! no locks held by swapper/3/0. stack backtrace: CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.5.0-rc7-think+ #3 92f821e0 1f3e5c340597d7fc 880468e07f10 92560c2a 880462145280 0001 880468e07f40 921376a6 93665ea0 cc7c876d28da 0005 9383dd60 Call Trace: [] dump_stack+0x67/0x9d [] lockdep_rcu_suspicious+0xe6/0x100 [] do_trace_write_msr+0x127/0x1a0 [] native_apic_msr_eoi_write+0x23/0x30 [] smp_trace_call_function_interrupt+0x38/0x360 [] trace_call_function_interrupt+0x90/0xa0 [] ? cpuidle_enter_state+0x1b4/0x520 Move the entering_irq() call before ack_APIC_irq(), because entering_irq() tells the RCU susbstems to end the extended quiescent state, so that the following trace call in ack_APIC_irq() works correctly. Suggested-by: Andi Kleen Fixes: 4787c368a9bc "x86/tracing: Add irq_enter/exit() in smp_trace_reschedule_interrupt()" Signed-off-by: Dave Jones Signed-off-by: Thomas Gleixner Cc: sta...@vger.kernel.org --- arch/x86/include/asm/apic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 0899cfc..98f25bb 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h @@ -643,8 +643,8 @@ static inline void entering_irq(void) static inline void entering_ack_irq(void) { - ack_APIC_irq(); entering_irq(); + ack_APIC_irq(); } static inline void ipi_entering_ack_irq(void)
[tip:x86/urgent] x86/apic: Fix suspicious RCU usage in smp_trace_call_function_interrupt()
Commit-ID: 7834c10313fb823e538f2772be78edcdeed2e6e3 Gitweb: http://git.kernel.org/tip/7834c10313fb823e538f2772be78edcdeed2e6e3 Author: Dave Jones AuthorDate: Mon, 14 Mar 2016 21:20:54 -0400 Committer: Thomas Gleixner CommitDate: Fri, 18 Mar 2016 14:51:06 +0100 x86/apic: Fix suspicious RCU usage in smp_trace_call_function_interrupt() Since 4.4, I've been able to trigger this occasionally: === [ INFO: suspicious RCU usage. ] 4.5.0-rc7-think+ #3 Not tainted Cc: Andi Kleen Link: http://lkml.kernel.org/r/20160315012054.ga17...@codemonkey.org.uk Signed-off-by: Thomas Gleixner --- ./arch/x86/include/asm/msr-trace.h:47 suspicious rcu_dereference_check() usage! other info that might help us debug this: RCU used illegally from idle CPU! rcu_scheduler_active = 1, debug_locks = 1 RCU used illegally from extended quiescent state! no locks held by swapper/3/0. stack backtrace: CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.5.0-rc7-think+ #3 92f821e0 1f3e5c340597d7fc 880468e07f10 92560c2a 880462145280 0001 880468e07f40 921376a6 93665ea0 cc7c876d28da 0005 9383dd60 Call Trace: [] dump_stack+0x67/0x9d [] lockdep_rcu_suspicious+0xe6/0x100 [] do_trace_write_msr+0x127/0x1a0 [] native_apic_msr_eoi_write+0x23/0x30 [] smp_trace_call_function_interrupt+0x38/0x360 [] trace_call_function_interrupt+0x90/0xa0 [] ? cpuidle_enter_state+0x1b4/0x520 Move the entering_irq() call before ack_APIC_irq(), because entering_irq() tells the RCU susbstems to end the extended quiescent state, so that the following trace call in ack_APIC_irq() works correctly. Suggested-by: Andi Kleen Fixes: 4787c368a9bc "x86/tracing: Add irq_enter/exit() in smp_trace_reschedule_interrupt()" Signed-off-by: Dave Jones Signed-off-by: Thomas Gleixner Cc: sta...@vger.kernel.org --- arch/x86/include/asm/apic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 0899cfc..98f25bb 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h @@ -643,8 +643,8 @@ static inline void entering_irq(void) static inline void entering_ack_irq(void) { - ack_APIC_irq(); entering_irq(); + ack_APIC_irq(); } static inline void ipi_entering_ack_irq(void)
[tip:x86/urgent] x86: Don' t enable F00F workaround on Intel Quark processors
Commit-ID: d4e1a0af1d3a88cdfc8c954d3005eb8745ec518d Gitweb: http://git.kernel.org/tip/d4e1a0af1d3a88cdfc8c954d3005eb8745ec518d Author: Dave Jones AuthorDate: Tue, 28 Oct 2014 13:57:53 -0400 Committer: Ingo Molnar CommitDate: Wed, 29 Oct 2014 08:52:09 +0100 x86: Don't enable F00F workaround on Intel Quark processors The Intel Quark processor is a part of family 5, but does not have the F00F bug present in Pentiums of the same family. Pentiums were models 0 through 8, Quark is model 9. Signed-off-by: Dave Jones Cc: Bryan O'Donoghue Link: http://lkml.kernel.org/r/20141028175753.ga12...@redhat.com Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar --- arch/x86/kernel/cpu/intel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 1ef4562..9cc6b6f 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -213,12 +213,13 @@ static void intel_workarounds(struct cpuinfo_x86 *c) { #ifdef CONFIG_X86_F00F_BUG /* -* All current models of Pentium and Pentium with MMX technology CPUs +* All models of Pentium and Pentium with MMX technology CPUs * have the F0 0F bug, which lets nonprivileged users lock up the * system. Announce that the fault handler will be checking for it. +* The Quark is also family 5, but does not have the same bug. */ clear_cpu_bug(c, X86_BUG_F00F); - if (!paravirt_enabled() && c->x86 == 5) { + if (!paravirt_enabled() && c->x86 == 5 && c->x86_model < 9) { static int f00f_workaround_enabled; set_cpu_bug(c, X86_BUG_F00F); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:x86/urgent] x86: Don' t enable F00F workaround on Intel Quark processors
Commit-ID: d4e1a0af1d3a88cdfc8c954d3005eb8745ec518d Gitweb: http://git.kernel.org/tip/d4e1a0af1d3a88cdfc8c954d3005eb8745ec518d Author: Dave Jones da...@redhat.com AuthorDate: Tue, 28 Oct 2014 13:57:53 -0400 Committer: Ingo Molnar mi...@kernel.org CommitDate: Wed, 29 Oct 2014 08:52:09 +0100 x86: Don't enable F00F workaround on Intel Quark processors The Intel Quark processor is a part of family 5, but does not have the F00F bug present in Pentiums of the same family. Pentiums were models 0 through 8, Quark is model 9. Signed-off-by: Dave Jones da...@redhat.com Cc: Bryan O'Donoghue pure.lo...@nexus-software.ie Link: http://lkml.kernel.org/r/20141028175753.ga12...@redhat.com Signed-off-by: Thomas Gleixner t...@linutronix.de Signed-off-by: Ingo Molnar mi...@kernel.org --- arch/x86/kernel/cpu/intel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 1ef4562..9cc6b6f 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -213,12 +213,13 @@ static void intel_workarounds(struct cpuinfo_x86 *c) { #ifdef CONFIG_X86_F00F_BUG /* -* All current models of Pentium and Pentium with MMX technology CPUs +* All models of Pentium and Pentium with MMX technology CPUs * have the F0 0F bug, which lets nonprivileged users lock up the * system. Announce that the fault handler will be checking for it. +* The Quark is also family 5, but does not have the same bug. */ clear_cpu_bug(c, X86_BUG_F00F); - if (!paravirt_enabled() c-x86 == 5) { + if (!paravirt_enabled() c-x86 == 5 c-x86_model 9) { static int f00f_workaround_enabled; set_cpu_bug(c, X86_BUG_F00F); -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:x86/urgent] x86: Don' t enable F00F workaround on Intel Quark processors
Commit-ID: c1dd2d38a55119e1611a9ea3ee30bcf8902e2b04 Gitweb: http://git.kernel.org/tip/c1dd2d38a55119e1611a9ea3ee30bcf8902e2b04 Author: Dave Jones AuthorDate: Tue, 28 Oct 2014 13:57:53 -0400 Committer: Thomas Gleixner CommitDate: Tue, 28 Oct 2014 19:31:23 +0100 x86: Don't enable F00F workaround on Intel Quark processors The Intel Quark processor is a part of family 5, but does not have the F00F bug present in Pentiums of the same family. Pentiums were models 0 through 8, Quark is model 9. Signed-off-by: Dave Jones Cc: Bryan O'Donoghue Link: http://lkml.kernel.org/r/20141028175753.ga12...@redhat.com Signed-off-by: Thomas Gleixner --- arch/x86/kernel/cpu/intel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 1ef4562..9cc6b6f 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -213,12 +213,13 @@ static void intel_workarounds(struct cpuinfo_x86 *c) { #ifdef CONFIG_X86_F00F_BUG /* -* All current models of Pentium and Pentium with MMX technology CPUs +* All models of Pentium and Pentium with MMX technology CPUs * have the F0 0F bug, which lets nonprivileged users lock up the * system. Announce that the fault handler will be checking for it. +* The Quark is also family 5, but does not have the same bug. */ clear_cpu_bug(c, X86_BUG_F00F); - if (!paravirt_enabled() && c->x86 == 5) { + if (!paravirt_enabled() && c->x86 == 5 && c->x86_model < 9) { static int f00f_workaround_enabled; set_cpu_bug(c, X86_BUG_F00F); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:x86/urgent] x86: Don' t enable F00F workaround on Intel Quark processors
Commit-ID: c1dd2d38a55119e1611a9ea3ee30bcf8902e2b04 Gitweb: http://git.kernel.org/tip/c1dd2d38a55119e1611a9ea3ee30bcf8902e2b04 Author: Dave Jones da...@redhat.com AuthorDate: Tue, 28 Oct 2014 13:57:53 -0400 Committer: Thomas Gleixner t...@linutronix.de CommitDate: Tue, 28 Oct 2014 19:31:23 +0100 x86: Don't enable F00F workaround on Intel Quark processors The Intel Quark processor is a part of family 5, but does not have the F00F bug present in Pentiums of the same family. Pentiums were models 0 through 8, Quark is model 9. Signed-off-by: Dave Jones da...@redhat.com Cc: Bryan O'Donoghue pure.lo...@nexus-software.ie Link: http://lkml.kernel.org/r/20141028175753.ga12...@redhat.com Signed-off-by: Thomas Gleixner t...@linutronix.de --- arch/x86/kernel/cpu/intel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 1ef4562..9cc6b6f 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -213,12 +213,13 @@ static void intel_workarounds(struct cpuinfo_x86 *c) { #ifdef CONFIG_X86_F00F_BUG /* -* All current models of Pentium and Pentium with MMX technology CPUs +* All models of Pentium and Pentium with MMX technology CPUs * have the F0 0F bug, which lets nonprivileged users lock up the * system. Announce that the fault handler will be checking for it. +* The Quark is also family 5, but does not have the same bug. */ clear_cpu_bug(c, X86_BUG_F00F); - if (!paravirt_enabled() c-x86 == 5) { + if (!paravirt_enabled() c-x86 == 5 c-x86_model 9) { static int f00f_workaround_enabled; set_cpu_bug(c, X86_BUG_F00F); -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:x86/cpu] Rename TAINT_UNSAFE_SMP to TAINT_CPU_OUT_OF_SPEC
Commit-ID: 8c90487cdc64847b4fdd812ab3047f426fec4d13 Gitweb: http://git.kernel.org/tip/8c90487cdc64847b4fdd812ab3047f426fec4d13 Author: Dave Jones AuthorDate: Wed, 26 Feb 2014 10:49:49 -0500 Committer: H. Peter Anvin CommitDate: Thu, 20 Mar 2014 16:28:09 -0700 Rename TAINT_UNSAFE_SMP to TAINT_CPU_OUT_OF_SPEC Rename TAINT_UNSAFE_SMP to TAINT_CPU_OUT_OF_SPEC, so we can repurpose the flag to encompass a wider range of pushing the CPU beyond its warrany. Signed-off-by: Dave Jones Link: http://lkml.kernel.org/r/20140226154949.ga...@redhat.com Signed-off-by: H. Peter Anvin --- arch/x86/kernel/cpu/amd.c | 2 +- include/linux/kernel.h| 2 +- kernel/module.c | 2 +- kernel/panic.c| 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index b85e43a..ce8b8ff 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -218,7 +218,7 @@ static void amd_k7_smp_check(struct cpuinfo_x86 *c) */ WARN_ONCE(1, "WARNING: This combination of AMD" " processors is not suitable for SMP.\n"); - add_taint(TAINT_UNSAFE_SMP, LOCKDEP_NOW_UNRELIABLE); + add_taint(TAINT_CPU_OUT_OF_SPEC, LOCKDEP_NOW_UNRELIABLE); } static void init_amd_k7(struct cpuinfo_x86 *c) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 196d1ea..08fb024 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -458,7 +458,7 @@ extern enum system_states { #define TAINT_PROPRIETARY_MODULE 0 #define TAINT_FORCED_MODULE1 -#define TAINT_UNSAFE_SMP 2 +#define TAINT_CPU_OUT_OF_SPEC 2 #define TAINT_FORCED_RMMOD 3 #define TAINT_MACHINE_CHECK4 #define TAINT_BAD_PAGE 5 diff --git a/kernel/module.c b/kernel/module.c index d24fcf2..ca2c1ad 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -1015,7 +1015,7 @@ static size_t module_flags_taint(struct module *mod, char *buf) buf[l++] = 'C'; /* * TAINT_FORCED_RMMOD: could be added. -* TAINT_UNSAFE_SMP, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't +* TAINT_CPU_OUT_OF_SPEC, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't * apply to modules. */ return l; diff --git a/kernel/panic.c b/kernel/panic.c index 6d63003..2270cfd 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -199,7 +199,7 @@ struct tnt { static const struct tnt tnts[] = { { TAINT_PROPRIETARY_MODULE, 'P', 'G' }, { TAINT_FORCED_MODULE, 'F', ' ' }, - { TAINT_UNSAFE_SMP, 'S', ' ' }, + { TAINT_CPU_OUT_OF_SPEC,'S', ' ' }, { TAINT_FORCED_RMMOD, 'R', ' ' }, { TAINT_MACHINE_CHECK, 'M', ' ' }, { TAINT_BAD_PAGE, 'B', ' ' }, -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:x86/cpu] Rename TAINT_UNSAFE_SMP to TAINT_CPU_OUT_OF_SPEC
Commit-ID: 8c90487cdc64847b4fdd812ab3047f426fec4d13 Gitweb: http://git.kernel.org/tip/8c90487cdc64847b4fdd812ab3047f426fec4d13 Author: Dave Jones da...@redhat.com AuthorDate: Wed, 26 Feb 2014 10:49:49 -0500 Committer: H. Peter Anvin h...@zytor.com CommitDate: Thu, 20 Mar 2014 16:28:09 -0700 Rename TAINT_UNSAFE_SMP to TAINT_CPU_OUT_OF_SPEC Rename TAINT_UNSAFE_SMP to TAINT_CPU_OUT_OF_SPEC, so we can repurpose the flag to encompass a wider range of pushing the CPU beyond its warrany. Signed-off-by: Dave Jones da...@fedoraproject.org Link: http://lkml.kernel.org/r/20140226154949.ga...@redhat.com Signed-off-by: H. Peter Anvin h...@zytor.com --- arch/x86/kernel/cpu/amd.c | 2 +- include/linux/kernel.h| 2 +- kernel/module.c | 2 +- kernel/panic.c| 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index b85e43a..ce8b8ff 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -218,7 +218,7 @@ static void amd_k7_smp_check(struct cpuinfo_x86 *c) */ WARN_ONCE(1, WARNING: This combination of AMD processors is not suitable for SMP.\n); - add_taint(TAINT_UNSAFE_SMP, LOCKDEP_NOW_UNRELIABLE); + add_taint(TAINT_CPU_OUT_OF_SPEC, LOCKDEP_NOW_UNRELIABLE); } static void init_amd_k7(struct cpuinfo_x86 *c) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 196d1ea..08fb024 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -458,7 +458,7 @@ extern enum system_states { #define TAINT_PROPRIETARY_MODULE 0 #define TAINT_FORCED_MODULE1 -#define TAINT_UNSAFE_SMP 2 +#define TAINT_CPU_OUT_OF_SPEC 2 #define TAINT_FORCED_RMMOD 3 #define TAINT_MACHINE_CHECK4 #define TAINT_BAD_PAGE 5 diff --git a/kernel/module.c b/kernel/module.c index d24fcf2..ca2c1ad 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -1015,7 +1015,7 @@ static size_t module_flags_taint(struct module *mod, char *buf) buf[l++] = 'C'; /* * TAINT_FORCED_RMMOD: could be added. -* TAINT_UNSAFE_SMP, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't +* TAINT_CPU_OUT_OF_SPEC, TAINT_MACHINE_CHECK, TAINT_BAD_PAGE don't * apply to modules. */ return l; diff --git a/kernel/panic.c b/kernel/panic.c index 6d63003..2270cfd 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -199,7 +199,7 @@ struct tnt { static const struct tnt tnts[] = { { TAINT_PROPRIETARY_MODULE, 'P', 'G' }, { TAINT_FORCED_MODULE, 'F', ' ' }, - { TAINT_UNSAFE_SMP, 'S', ' ' }, + { TAINT_CPU_OUT_OF_SPEC,'S', ' ' }, { TAINT_FORCED_RMMOD, 'R', ' ' }, { TAINT_MACHINE_CHECK, 'M', ' ' }, { TAINT_BAD_PAGE, 'B', ' ' }, -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:perf/urgent] perf/x86: Fix leak in uncore_type_init failure paths
Commit-ID: b7b4839d93e50adccef29eccb694807cdcb8bee3 Gitweb: http://git.kernel.org/tip/b7b4839d93e50adccef29eccb694807cdcb8bee3 Author: Dave Jones AuthorDate: Thu, 6 Mar 2014 12:20:28 -0500 Committer: Ingo Molnar CommitDate: Tue, 11 Mar 2014 11:59:34 +0100 perf/x86: Fix leak in uncore_type_init failure paths The error path of uncore_type_init() frees up any allocations that were made along the way, but it relies upon type->pmus being set, which only happens if the function succeeds. As type->pmus remains null in this case, the call to uncore_type_exit will do nothing. Moving the assignment earlier will allow us to actually free those allocations should something go awry. Signed-off-by: Dave Jones Acked-by: Peter Zijlstra Link: http://lkml.kernel.org/r/20140306172028.ga...@redhat.com Signed-off-by: Ingo Molnar --- arch/x86/kernel/cpu/perf_event_intel_uncore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c index c88f7f4..047f540 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c @@ -3334,6 +3334,8 @@ static int __init uncore_type_init(struct intel_uncore_type *type) if (!pmus) return -ENOMEM; + type->pmus = pmus; + type->unconstrainted = (struct event_constraint) __EVENT_CONSTRAINT(0, (1ULL << type->num_counters) - 1, 0, type->num_counters, 0, 0); @@ -3369,7 +3371,6 @@ static int __init uncore_type_init(struct intel_uncore_type *type) } type->pmu_group = _pmu_attr_group; - type->pmus = pmus; return 0; fail: uncore_type_exit(type); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:perf/urgent] perf/x86: Fix leak in uncore_type_init failure paths
Commit-ID: b7b4839d93e50adccef29eccb694807cdcb8bee3 Gitweb: http://git.kernel.org/tip/b7b4839d93e50adccef29eccb694807cdcb8bee3 Author: Dave Jones da...@redhat.com AuthorDate: Thu, 6 Mar 2014 12:20:28 -0500 Committer: Ingo Molnar mi...@kernel.org CommitDate: Tue, 11 Mar 2014 11:59:34 +0100 perf/x86: Fix leak in uncore_type_init failure paths The error path of uncore_type_init() frees up any allocations that were made along the way, but it relies upon type-pmus being set, which only happens if the function succeeds. As type-pmus remains null in this case, the call to uncore_type_exit will do nothing. Moving the assignment earlier will allow us to actually free those allocations should something go awry. Signed-off-by: Dave Jones da...@fedoraproject.org Acked-by: Peter Zijlstra pet...@infradead.org Link: http://lkml.kernel.org/r/20140306172028.ga...@redhat.com Signed-off-by: Ingo Molnar mi...@kernel.org --- arch/x86/kernel/cpu/perf_event_intel_uncore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c index c88f7f4..047f540 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c @@ -3334,6 +3334,8 @@ static int __init uncore_type_init(struct intel_uncore_type *type) if (!pmus) return -ENOMEM; + type-pmus = pmus; + type-unconstrainted = (struct event_constraint) __EVENT_CONSTRAINT(0, (1ULL type-num_counters) - 1, 0, type-num_counters, 0, 0); @@ -3369,7 +3371,6 @@ static int __init uncore_type_init(struct intel_uncore_type *type) } type-pmu_group = uncore_pmu_attr_group; - type-pmus = pmus; return 0; fail: uncore_type_exit(type); -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:x86/reboot] x86/reboot: Sort reboot DMI quirks by vendor
Commit-ID: e56e57f6613d5ed5c3127419341d1aa989a11971 Gitweb: http://git.kernel.org/tip/e56e57f6613d5ed5c3127419341d1aa989a11971 Author: Dave Jones AuthorDate: Tue, 1 Oct 2013 16:36:55 -0400 Committer: Ingo Molnar CommitDate: Wed, 2 Oct 2013 08:02:24 +0200 x86/reboot: Sort reboot DMI quirks by vendor Grouping them by vendor should make it easier to spot duplicates. Signed-off-by: Dave Jones Link: http://lkml.kernel.org/r/20131001203655.ga10...@redhat.com Signed-off-by: Ingo Molnar --- arch/x86/kernel/reboot.c | 260 +-- 1 file changed, 136 insertions(+), 124 deletions(-) diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index d9333a4..7692520 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c @@ -136,236 +136,248 @@ static int __init set_kbd_reboot(const struct dmi_system_id *d) * This is a single dmi_table handling all reboot quirks. */ static struct dmi_system_id __initdata reboot_dmi_table[] = { - { /* Handle problems with rebooting on Dell E520's */ - .callback = set_bios_reboot, - .ident = "Dell E520", + + /* Acer */ + { /* Handle reboot issue on Acer Aspire one */ + .callback = set_kbd_reboot, + .ident = "Acer Aspire One A110", .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), - DMI_MATCH(DMI_PRODUCT_NAME, "Dell DM061"), + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "AOA110"), }, }, - { /* Handle problems with rebooting on Dell 1300's */ - .callback = set_bios_reboot, - .ident = "Dell PowerEdge 1300", + + /* Apple */ + { /* Handle problems with rebooting on Apple MacBook5 */ + .callback = set_pci_reboot, + .ident = "Apple MacBook5", .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"), - DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 1300/"), + DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "MacBook5"), }, }, - { /* Handle problems with rebooting on Dell 300's */ - .callback = set_bios_reboot, - .ident = "Dell PowerEdge 300", + { /* Handle problems with rebooting on Apple MacBookPro5 */ + .callback = set_pci_reboot, + .ident = "Apple MacBookPro5", .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"), - DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 300/"), + DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro5"), }, }, - { /* Handle problems with rebooting on Dell Optiplex 745's SFF */ - .callback = set_bios_reboot, - .ident = "Dell OptiPlex 745", + { /* Handle problems with rebooting on Apple Macmini3,1 */ + .callback = set_pci_reboot, + .ident = "Apple Macmini3,1", .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), - DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"), + DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Macmini3,1"), }, }, - { /* Handle problems with rebooting on Dell Optiplex 745's DFF */ - .callback = set_bios_reboot, - .ident = "Dell OptiPlex 745", + { /* Handle problems with rebooting on the iMac9,1. */ + .callback = set_pci_reboot, + .ident = "Apple iMac9,1", .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), - DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"), - DMI_MATCH(DMI_BOARD_NAME, "0MM599"), + DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "iMac9,1"), }, }, - { /* Handle problems with rebooting on Dell Optiplex 745 with 0KW626 */ + + /* ASUS */ + { /* Handle problems with rebooting on ASUS P4S800 */ .callback = set_bios_reboot, - .ident = "Dell OptiPlex 745", + .ident = "ASUS P4S800", .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), - DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"), - DMI_MATCH(DMI_BOARD_NAME, "0KW626"), + DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), +
[tip:x86/reboot] x86/reboot: Sort reboot DMI quirks by vendor
Commit-ID: e56e57f6613d5ed5c3127419341d1aa989a11971 Gitweb: http://git.kernel.org/tip/e56e57f6613d5ed5c3127419341d1aa989a11971 Author: Dave Jones da...@redhat.com AuthorDate: Tue, 1 Oct 2013 16:36:55 -0400 Committer: Ingo Molnar mi...@kernel.org CommitDate: Wed, 2 Oct 2013 08:02:24 +0200 x86/reboot: Sort reboot DMI quirks by vendor Grouping them by vendor should make it easier to spot duplicates. Signed-off-by: Dave Jones da...@fedoraproject.org Link: http://lkml.kernel.org/r/20131001203655.ga10...@redhat.com Signed-off-by: Ingo Molnar mi...@kernel.org --- arch/x86/kernel/reboot.c | 260 +-- 1 file changed, 136 insertions(+), 124 deletions(-) diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index d9333a4..7692520 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c @@ -136,236 +136,248 @@ static int __init set_kbd_reboot(const struct dmi_system_id *d) * This is a single dmi_table handling all reboot quirks. */ static struct dmi_system_id __initdata reboot_dmi_table[] = { - { /* Handle problems with rebooting on Dell E520's */ - .callback = set_bios_reboot, - .ident = Dell E520, + + /* Acer */ + { /* Handle reboot issue on Acer Aspire one */ + .callback = set_kbd_reboot, + .ident = Acer Aspire One A110, .matches = { - DMI_MATCH(DMI_SYS_VENDOR, Dell Inc.), - DMI_MATCH(DMI_PRODUCT_NAME, Dell DM061), + DMI_MATCH(DMI_SYS_VENDOR, Acer), + DMI_MATCH(DMI_PRODUCT_NAME, AOA110), }, }, - { /* Handle problems with rebooting on Dell 1300's */ - .callback = set_bios_reboot, - .ident = Dell PowerEdge 1300, + + /* Apple */ + { /* Handle problems with rebooting on Apple MacBook5 */ + .callback = set_pci_reboot, + .ident = Apple MacBook5, .matches = { - DMI_MATCH(DMI_SYS_VENDOR, Dell Computer Corporation), - DMI_MATCH(DMI_PRODUCT_NAME, PowerEdge 1300/), + DMI_MATCH(DMI_SYS_VENDOR, Apple Inc.), + DMI_MATCH(DMI_PRODUCT_NAME, MacBook5), }, }, - { /* Handle problems with rebooting on Dell 300's */ - .callback = set_bios_reboot, - .ident = Dell PowerEdge 300, + { /* Handle problems with rebooting on Apple MacBookPro5 */ + .callback = set_pci_reboot, + .ident = Apple MacBookPro5, .matches = { - DMI_MATCH(DMI_SYS_VENDOR, Dell Computer Corporation), - DMI_MATCH(DMI_PRODUCT_NAME, PowerEdge 300/), + DMI_MATCH(DMI_SYS_VENDOR, Apple Inc.), + DMI_MATCH(DMI_PRODUCT_NAME, MacBookPro5), }, }, - { /* Handle problems with rebooting on Dell Optiplex 745's SFF */ - .callback = set_bios_reboot, - .ident = Dell OptiPlex 745, + { /* Handle problems with rebooting on Apple Macmini3,1 */ + .callback = set_pci_reboot, + .ident = Apple Macmini3,1, .matches = { - DMI_MATCH(DMI_SYS_VENDOR, Dell Inc.), - DMI_MATCH(DMI_PRODUCT_NAME, OptiPlex 745), + DMI_MATCH(DMI_SYS_VENDOR, Apple Inc.), + DMI_MATCH(DMI_PRODUCT_NAME, Macmini3,1), }, }, - { /* Handle problems with rebooting on Dell Optiplex 745's DFF */ - .callback = set_bios_reboot, - .ident = Dell OptiPlex 745, + { /* Handle problems with rebooting on the iMac9,1. */ + .callback = set_pci_reboot, + .ident = Apple iMac9,1, .matches = { - DMI_MATCH(DMI_SYS_VENDOR, Dell Inc.), - DMI_MATCH(DMI_PRODUCT_NAME, OptiPlex 745), - DMI_MATCH(DMI_BOARD_NAME, 0MM599), + DMI_MATCH(DMI_SYS_VENDOR, Apple Inc.), + DMI_MATCH(DMI_PRODUCT_NAME, iMac9,1), }, }, - { /* Handle problems with rebooting on Dell Optiplex 745 with 0KW626 */ + + /* ASUS */ + { /* Handle problems with rebooting on ASUS P4S800 */ .callback = set_bios_reboot, - .ident = Dell OptiPlex 745, + .ident = ASUS P4S800, .matches = { - DMI_MATCH(DMI_SYS_VENDOR, Dell Inc.), - DMI_MATCH(DMI_PRODUCT_NAME, OptiPlex 745), - DMI_MATCH(DMI_BOARD_NAME, 0KW626), + DMI_MATCH(DMI_BOARD_VENDOR, ASUSTeK Computer INC.), +
[tip:x86/urgent] x86/reboot: Fix apparent cut-n-paste mistake in Dell reboot workaround
Commit-ID: 7a20c2fad61aa3624e83c671d36dbd36b2661476 Gitweb: http://git.kernel.org/tip/7a20c2fad61aa3624e83c671d36dbd36b2661476 Author: Dave Jones AuthorDate: Tue, 24 Sep 2013 20:13:44 -0400 Committer: Ingo Molnar CommitDate: Wed, 25 Sep 2013 08:41:10 +0200 x86/reboot: Fix apparent cut-n-paste mistake in Dell reboot workaround This seems to have been copied from the Optiplex 990 entry above, but somoene forgot to change the ident text. Signed-off-by: Dave Jones Link: http://lkml.kernel.org/r/20130925001344.ga13...@redhat.com Signed-off-by: Ingo Molnar --- arch/x86/kernel/reboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 5f4ad27..e643e74 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c @@ -352,7 +352,7 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { }, { /* Handle problems with rebooting on the Precision M6600. */ .callback = set_pci_reboot, - .ident = "Dell OptiPlex 990", + .ident = "Dell Precision M6600", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), DMI_MATCH(DMI_PRODUCT_NAME, "Precision M6600"), -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:x86/urgent] x86/reboot: Fix apparent cut-n-paste mistake in Dell reboot workaround
Commit-ID: 7a20c2fad61aa3624e83c671d36dbd36b2661476 Gitweb: http://git.kernel.org/tip/7a20c2fad61aa3624e83c671d36dbd36b2661476 Author: Dave Jones da...@redhat.com AuthorDate: Tue, 24 Sep 2013 20:13:44 -0400 Committer: Ingo Molnar mi...@kernel.org CommitDate: Wed, 25 Sep 2013 08:41:10 +0200 x86/reboot: Fix apparent cut-n-paste mistake in Dell reboot workaround This seems to have been copied from the Optiplex 990 entry above, but somoene forgot to change the ident text. Signed-off-by: Dave Jones da...@fedoraproject.org Link: http://lkml.kernel.org/r/20130925001344.ga13...@redhat.com Signed-off-by: Ingo Molnar mi...@kernel.org --- arch/x86/kernel/reboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 5f4ad27..e643e74 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c @@ -352,7 +352,7 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { }, { /* Handle problems with rebooting on the Precision M6600. */ .callback = set_pci_reboot, - .ident = Dell OptiPlex 990, + .ident = Dell Precision M6600, .matches = { DMI_MATCH(DMI_SYS_VENDOR, Dell Inc.), DMI_MATCH(DMI_PRODUCT_NAME, Precision M6600), -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:x86/debug] x86/debug: Only print out DR registers if they are not power-on defaults
Commit-ID: 4338774cd41a6abf72aa76585ce2184cea8ff8a2 Gitweb: http://git.kernel.org/tip/4338774cd41a6abf72aa76585ce2184cea8ff8a2 Author: Dave Jones AuthorDate: Tue, 18 Jun 2013 12:09:11 -0400 Committer: Ingo Molnar CommitDate: Wed, 19 Jun 2013 14:33:59 +0200 x86/debug: Only print out DR registers if they are not power-on defaults The DR registers are rarely useful when decoding oopses. With screen real estate during oopses at a premium, we can save two lines by only printing out these registers when they are set to something other than they power-on state. Signed-off-by: Dave Jones Acked-by: Borislav Petkov Cc: Linus Torvalds Cc: Andrew Morton Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20130618160911.ga24...@redhat.com Signed-off-by: Ingo Molnar --- arch/x86/kernel/process_32.c | 11 --- arch/x86/kernel/process_64.c | 9 - 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 7305f7d..f84cfd1 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c @@ -110,11 +110,16 @@ void __show_regs(struct pt_regs *regs, int all) get_debugreg(d1, 1); get_debugreg(d2, 2); get_debugreg(d3, 3); - printk(KERN_DEFAULT "DR0: %08lx DR1: %08lx DR2: %08lx DR3: %08lx\n", - d0, d1, d2, d3); - get_debugreg(d6, 6); get_debugreg(d7, 7); + + /* Only print out debug registers if they are in their non-default state. */ + if ((d0 == 0) && (d1 == 0) && (d2 == 0) && (d3 == 0) && + (d6 == DR6_RESERVED) && (d7 == 0x400)) + return; + + printk(KERN_DEFAULT "DR0: %08lx DR1: %08lx DR2: %08lx DR3: %08lx\n", + d0, d1, d2, d3); printk(KERN_DEFAULT "DR6: %08lx DR7: %08lx\n", d6, d7); } diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 355ae06..a8b9abc 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@ -105,11 +105,18 @@ void __show_regs(struct pt_regs *regs, int all) get_debugreg(d0, 0); get_debugreg(d1, 1); get_debugreg(d2, 2); - printk(KERN_DEFAULT "DR0: %016lx DR1: %016lx DR2: %016lx\n", d0, d1, d2); get_debugreg(d3, 3); get_debugreg(d6, 6); get_debugreg(d7, 7); + + /* Only print out debug registers if they are in their non-default state. */ + if ((d0 == 0) && (d1 == 0) && (d2 == 0) && (d3 == 0) && + (d6 == DR6_RESERVED) && (d7 == 0x400)) + return; + + printk(KERN_DEFAULT "DR0: %016lx DR1: %016lx DR2: %016lx\n", d0, d1, d2); printk(KERN_DEFAULT "DR3: %016lx DR6: %016lx DR7: %016lx\n", d3, d6, d7); + } void release_thread(struct task_struct *dead_task) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:x86/debug] x86/debug: Only print out DR registers if they are not power-on defaults
Commit-ID: 4338774cd41a6abf72aa76585ce2184cea8ff8a2 Gitweb: http://git.kernel.org/tip/4338774cd41a6abf72aa76585ce2184cea8ff8a2 Author: Dave Jones da...@redhat.com AuthorDate: Tue, 18 Jun 2013 12:09:11 -0400 Committer: Ingo Molnar mi...@kernel.org CommitDate: Wed, 19 Jun 2013 14:33:59 +0200 x86/debug: Only print out DR registers if they are not power-on defaults The DR registers are rarely useful when decoding oopses. With screen real estate during oopses at a premium, we can save two lines by only printing out these registers when they are set to something other than they power-on state. Signed-off-by: Dave Jones da...@redhat.com Acked-by: Borislav Petkov b...@suse.de Cc: Linus Torvalds torva...@linux-foundation.org Cc: Andrew Morton a...@linux-foundation.org Cc: Peter Zijlstra a.p.zijls...@chello.nl Cc: Thomas Gleixner t...@linutronix.de Link: http://lkml.kernel.org/r/20130618160911.ga24...@redhat.com Signed-off-by: Ingo Molnar mi...@kernel.org --- arch/x86/kernel/process_32.c | 11 --- arch/x86/kernel/process_64.c | 9 - 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 7305f7d..f84cfd1 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c @@ -110,11 +110,16 @@ void __show_regs(struct pt_regs *regs, int all) get_debugreg(d1, 1); get_debugreg(d2, 2); get_debugreg(d3, 3); - printk(KERN_DEFAULT DR0: %08lx DR1: %08lx DR2: %08lx DR3: %08lx\n, - d0, d1, d2, d3); - get_debugreg(d6, 6); get_debugreg(d7, 7); + + /* Only print out debug registers if they are in their non-default state. */ + if ((d0 == 0) (d1 == 0) (d2 == 0) (d3 == 0) + (d6 == DR6_RESERVED) (d7 == 0x400)) + return; + + printk(KERN_DEFAULT DR0: %08lx DR1: %08lx DR2: %08lx DR3: %08lx\n, + d0, d1, d2, d3); printk(KERN_DEFAULT DR6: %08lx DR7: %08lx\n, d6, d7); } diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 355ae06..a8b9abc 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c @@ -105,11 +105,18 @@ void __show_regs(struct pt_regs *regs, int all) get_debugreg(d0, 0); get_debugreg(d1, 1); get_debugreg(d2, 2); - printk(KERN_DEFAULT DR0: %016lx DR1: %016lx DR2: %016lx\n, d0, d1, d2); get_debugreg(d3, 3); get_debugreg(d6, 6); get_debugreg(d7, 7); + + /* Only print out debug registers if they are in their non-default state. */ + if ((d0 == 0) (d1 == 0) (d2 == 0) (d3 == 0) + (d6 == DR6_RESERVED) (d7 == 0x400)) + return; + + printk(KERN_DEFAULT DR0: %016lx DR1: %016lx DR2: %016lx\n, d0, d1, d2); printk(KERN_DEFAULT DR3: %016lx DR6: %016lx DR7: %016lx\n, d3, d6, d7); + } void release_thread(struct task_struct *dead_task) -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:core/locking] lockdep: Consolidate bug messages into a single print_lockdep_off() function
Commit-ID: 2c522836627c6e78660f8bd52cdb4cdcb75e3e3c Gitweb: http://git.kernel.org/tip/2c522836627c6e78660f8bd52cdb4cdcb75e3e3c Author: Dave Jones AuthorDate: Thu, 25 Apr 2013 13:40:02 -0400 Committer: Ingo Molnar CommitDate: Fri, 26 Apr 2013 08:37:22 +0200 lockdep: Consolidate bug messages into a single print_lockdep_off() function Also add some missing printk levels. Signed-off-by: Dave Jones Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20130425174002.ga26...@redhat.com [ Tweaked the messages a bit. ] Signed-off-by: Ingo Molnar --- kernel/lockdep.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/kernel/lockdep.c b/kernel/lockdep.c index c5d1e6b..6a3bccb 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -380,6 +380,13 @@ static int verbose(struct lock_class *class) unsigned long nr_stack_trace_entries; static unsigned long stack_trace[MAX_STACK_TRACE_ENTRIES]; +static void print_lockdep_off(const char *bug_msg) +{ + printk(KERN_DEBUG "%s\n", bug_msg); + printk(KERN_DEBUG "turning off the locking correctness validator.\n"); + printk(KERN_DEBUG "Please attach the output of /proc/lock_stat to the bug report\n"); +} + static int save_trace(struct stack_trace *trace) { trace->nr_entries = 0; @@ -409,9 +416,7 @@ static int save_trace(struct stack_trace *trace) if (!debug_locks_off_graph_unlock()) return 0; - printk("BUG: MAX_STACK_TRACE_ENTRIES too low!\n"); - printk("turning off the locking correctness validator.\n"); - printk("Attach output of /proc/lock_stat to bug report\n"); + print_lockdep_off("BUG: MAX_STACK_TRACE_ENTRIES too low!"); dump_stack(); return 0; @@ -764,9 +769,7 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force) } raw_local_irq_restore(flags); - printk("BUG: MAX_LOCKDEP_KEYS too low!\n"); - printk("turning off the locking correctness validator.\n"); - printk("Attach output of /proc/lock_stat to bug report\n"); + print_lockdep_off("BUG: MAX_LOCKDEP_KEYS too low!"); dump_stack(); return NULL; } @@ -836,9 +839,7 @@ static struct lock_list *alloc_list_entry(void) if (!debug_locks_off_graph_unlock()) return NULL; - printk("BUG: MAX_LOCKDEP_ENTRIES too low!\n"); - printk("turning off the locking correctness validator.\n"); - printk("Attach output of /proc/lock_stat to bug report\n"); + print_lockdep_off("BUG: MAX_LOCKDEP_ENTRIES too low!"); dump_stack(); return NULL; } @@ -2051,9 +2052,7 @@ cache_hit: if (!debug_locks_off_graph_unlock()) return 0; - printk("BUG: MAX_LOCKDEP_CHAINS too low!\n"); - printk("turning off the locking correctness validator.\n"); - printk("Attach output of /proc/lock_stat to bug report\n"); + print_lockdep_off("BUG: MAX_LOCKDEP_CHAINS too low!"); dump_stack(); return 0; } @@ -3192,10 +3191,9 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, #endif if (unlikely(curr->lockdep_depth >= MAX_LOCK_DEPTH)) { debug_locks_off(); - printk("BUG: MAX_LOCK_DEPTH too low, depth: %i max: %lu!\n", + print_lockdep_off("BUG: MAX_LOCK_DEPTH too low!"); + printk(KERN_DEBUG "depth: %i max: %lu!\n", curr->lockdep_depth, MAX_LOCK_DEPTH); - printk("turning off the locking correctness validator.\n"); - printk("Attach output of /proc/lock_stat to bug report\n"); lockdep_print_held_locks(current); debug_show_all_locks(); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:core/locking] lockdep: Print out additional debugging advice when we hit lockdep BUGs
Commit-ID: 199e371f59d31c828345b0d959d27d752827b517 Gitweb: http://git.kernel.org/tip/199e371f59d31c828345b0d959d27d752827b517 Author: Dave Jones AuthorDate: Tue, 23 Apr 2013 12:34:03 -0400 Committer: Ingo Molnar CommitDate: Fri, 26 Apr 2013 08:36:33 +0200 lockdep: Print out additional debugging advice when we hit lockdep BUGs We occasionally get reports of these BUGs being hit, and the stack trace doesn't necessarily always tell us what we need to know about why we are hitting those limits. If users start attaching /proc/lock_stats to reports we may have more of a clue what's going on. Signed-off-by: Dave Jones Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20130423163403.ga12...@redhat.com Signed-off-by: Ingo Molnar --- kernel/lockdep.c | 5 + 1 file changed, 5 insertions(+) diff --git a/kernel/lockdep.c b/kernel/lockdep.c index e5dedda..c5d1e6b 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -411,6 +411,7 @@ static int save_trace(struct stack_trace *trace) printk("BUG: MAX_STACK_TRACE_ENTRIES too low!\n"); printk("turning off the locking correctness validator.\n"); + printk("Attach output of /proc/lock_stat to bug report\n"); dump_stack(); return 0; @@ -765,6 +766,7 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force) printk("BUG: MAX_LOCKDEP_KEYS too low!\n"); printk("turning off the locking correctness validator.\n"); + printk("Attach output of /proc/lock_stat to bug report\n"); dump_stack(); return NULL; } @@ -836,6 +838,7 @@ static struct lock_list *alloc_list_entry(void) printk("BUG: MAX_LOCKDEP_ENTRIES too low!\n"); printk("turning off the locking correctness validator.\n"); + printk("Attach output of /proc/lock_stat to bug report\n"); dump_stack(); return NULL; } @@ -2050,6 +2053,7 @@ cache_hit: printk("BUG: MAX_LOCKDEP_CHAINS too low!\n"); printk("turning off the locking correctness validator.\n"); + printk("Attach output of /proc/lock_stat to bug report\n"); dump_stack(); return 0; } @@ -3191,6 +3195,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, printk("BUG: MAX_LOCK_DEPTH too low, depth: %i max: %lu!\n", curr->lockdep_depth, MAX_LOCK_DEPTH); printk("turning off the locking correctness validator.\n"); + printk("Attach output of /proc/lock_stat to bug report\n"); lockdep_print_held_locks(current); debug_show_all_locks(); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:core/locking] lockdep: Print out additional debugging advice when we hit lockdep BUGs
Commit-ID: 199e371f59d31c828345b0d959d27d752827b517 Gitweb: http://git.kernel.org/tip/199e371f59d31c828345b0d959d27d752827b517 Author: Dave Jones da...@redhat.com AuthorDate: Tue, 23 Apr 2013 12:34:03 -0400 Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 26 Apr 2013 08:36:33 +0200 lockdep: Print out additional debugging advice when we hit lockdep BUGs We occasionally get reports of these BUGs being hit, and the stack trace doesn't necessarily always tell us what we need to know about why we are hitting those limits. If users start attaching /proc/lock_stats to reports we may have more of a clue what's going on. Signed-off-by: Dave Jones da...@redhat.com Cc: Peter Zijlstra a.p.zijls...@chello.nl Link: http://lkml.kernel.org/r/20130423163403.ga12...@redhat.com Signed-off-by: Ingo Molnar mi...@kernel.org --- kernel/lockdep.c | 5 + 1 file changed, 5 insertions(+) diff --git a/kernel/lockdep.c b/kernel/lockdep.c index e5dedda..c5d1e6b 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -411,6 +411,7 @@ static int save_trace(struct stack_trace *trace) printk(BUG: MAX_STACK_TRACE_ENTRIES too low!\n); printk(turning off the locking correctness validator.\n); + printk(Attach output of /proc/lock_stat to bug report\n); dump_stack(); return 0; @@ -765,6 +766,7 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force) printk(BUG: MAX_LOCKDEP_KEYS too low!\n); printk(turning off the locking correctness validator.\n); + printk(Attach output of /proc/lock_stat to bug report\n); dump_stack(); return NULL; } @@ -836,6 +838,7 @@ static struct lock_list *alloc_list_entry(void) printk(BUG: MAX_LOCKDEP_ENTRIES too low!\n); printk(turning off the locking correctness validator.\n); + printk(Attach output of /proc/lock_stat to bug report\n); dump_stack(); return NULL; } @@ -2050,6 +2053,7 @@ cache_hit: printk(BUG: MAX_LOCKDEP_CHAINS too low!\n); printk(turning off the locking correctness validator.\n); + printk(Attach output of /proc/lock_stat to bug report\n); dump_stack(); return 0; } @@ -3191,6 +3195,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, printk(BUG: MAX_LOCK_DEPTH too low, depth: %i max: %lu!\n, curr-lockdep_depth, MAX_LOCK_DEPTH); printk(turning off the locking correctness validator.\n); + printk(Attach output of /proc/lock_stat to bug report\n); lockdep_print_held_locks(current); debug_show_all_locks(); -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:core/locking] lockdep: Consolidate bug messages into a single print_lockdep_off() function
Commit-ID: 2c522836627c6e78660f8bd52cdb4cdcb75e3e3c Gitweb: http://git.kernel.org/tip/2c522836627c6e78660f8bd52cdb4cdcb75e3e3c Author: Dave Jones da...@redhat.com AuthorDate: Thu, 25 Apr 2013 13:40:02 -0400 Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 26 Apr 2013 08:37:22 +0200 lockdep: Consolidate bug messages into a single print_lockdep_off() function Also add some missing printk levels. Signed-off-by: Dave Jones da...@redhat.com Cc: Peter Zijlstra a.p.zijls...@chello.nl Link: http://lkml.kernel.org/r/20130425174002.ga26...@redhat.com [ Tweaked the messages a bit. ] Signed-off-by: Ingo Molnar mi...@kernel.org --- kernel/lockdep.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/kernel/lockdep.c b/kernel/lockdep.c index c5d1e6b..6a3bccb 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -380,6 +380,13 @@ static int verbose(struct lock_class *class) unsigned long nr_stack_trace_entries; static unsigned long stack_trace[MAX_STACK_TRACE_ENTRIES]; +static void print_lockdep_off(const char *bug_msg) +{ + printk(KERN_DEBUG %s\n, bug_msg); + printk(KERN_DEBUG turning off the locking correctness validator.\n); + printk(KERN_DEBUG Please attach the output of /proc/lock_stat to the bug report\n); +} + static int save_trace(struct stack_trace *trace) { trace-nr_entries = 0; @@ -409,9 +416,7 @@ static int save_trace(struct stack_trace *trace) if (!debug_locks_off_graph_unlock()) return 0; - printk(BUG: MAX_STACK_TRACE_ENTRIES too low!\n); - printk(turning off the locking correctness validator.\n); - printk(Attach output of /proc/lock_stat to bug report\n); + print_lockdep_off(BUG: MAX_STACK_TRACE_ENTRIES too low!); dump_stack(); return 0; @@ -764,9 +769,7 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force) } raw_local_irq_restore(flags); - printk(BUG: MAX_LOCKDEP_KEYS too low!\n); - printk(turning off the locking correctness validator.\n); - printk(Attach output of /proc/lock_stat to bug report\n); + print_lockdep_off(BUG: MAX_LOCKDEP_KEYS too low!); dump_stack(); return NULL; } @@ -836,9 +839,7 @@ static struct lock_list *alloc_list_entry(void) if (!debug_locks_off_graph_unlock()) return NULL; - printk(BUG: MAX_LOCKDEP_ENTRIES too low!\n); - printk(turning off the locking correctness validator.\n); - printk(Attach output of /proc/lock_stat to bug report\n); + print_lockdep_off(BUG: MAX_LOCKDEP_ENTRIES too low!); dump_stack(); return NULL; } @@ -2051,9 +2052,7 @@ cache_hit: if (!debug_locks_off_graph_unlock()) return 0; - printk(BUG: MAX_LOCKDEP_CHAINS too low!\n); - printk(turning off the locking correctness validator.\n); - printk(Attach output of /proc/lock_stat to bug report\n); + print_lockdep_off(BUG: MAX_LOCKDEP_CHAINS too low!); dump_stack(); return 0; } @@ -3192,10 +3191,9 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, #endif if (unlikely(curr-lockdep_depth = MAX_LOCK_DEPTH)) { debug_locks_off(); - printk(BUG: MAX_LOCK_DEPTH too low, depth: %i max: %lu!\n, + print_lockdep_off(BUG: MAX_LOCK_DEPTH too low!); + printk(KERN_DEBUG depth: %i max: %lu!\n, curr-lockdep_depth, MAX_LOCK_DEPTH); - printk(turning off the locking correctness validator.\n); - printk(Attach output of /proc/lock_stat to bug report\n); lockdep_print_held_locks(current); debug_show_all_locks(); -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:x86/apic] x86/apic: Remove noisy zero-mask warning from default_send_IPI_mask_logical()
Commit-ID: e3f0f36ddf1b2743a0d4ea312996536a9c37e1c7 Gitweb: http://git.kernel.org/tip/e3f0f36ddf1b2743a0d4ea312996536a9c37e1c7 Author: Dave Jones AuthorDate: Fri, 18 Jan 2013 12:58:47 -0500 Committer: Ingo Molnar CommitDate: Thu, 24 Jan 2013 12:12:42 +0100 x86/apic: Remove noisy zero-mask warning from default_send_IPI_mask_logical() Since circa 3.5, we've had dozens of reports of people hitting this warning. Forwarded reports have been met with silence, so just remove the warning if no-one cares. Example reports: https://bugzilla.redhat.com/show_bug.cgi?id=797687 https://bugzilla.redhat.com/show_bug.cgi?id=867174 https://bugzilla.redhat.com/show_bug.cgi?id=894865 Signed-off-by: Dave Jones Cc: Andrew Morton Link: http://lkml.kernel.org/r/20130118175847.ga27...@redhat.com Signed-off-by: Ingo Molnar --- arch/x86/kernel/apic/ipi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/apic/ipi.c b/arch/x86/kernel/apic/ipi.c index cce91bf..7434d85 100644 --- a/arch/x86/kernel/apic/ipi.c +++ b/arch/x86/kernel/apic/ipi.c @@ -106,7 +106,7 @@ void default_send_IPI_mask_logical(const struct cpumask *cpumask, int vector) unsigned long mask = cpumask_bits(cpumask)[0]; unsigned long flags; - if (WARN_ONCE(!mask, "empty IPI mask")) + if (!mask) return; local_irq_save(flags); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:x86/apic] x86/apic: Remove noisy zero-mask warning from default_send_IPI_mask_logical()
Commit-ID: e3f0f36ddf1b2743a0d4ea312996536a9c37e1c7 Gitweb: http://git.kernel.org/tip/e3f0f36ddf1b2743a0d4ea312996536a9c37e1c7 Author: Dave Jones da...@redhat.com AuthorDate: Fri, 18 Jan 2013 12:58:47 -0500 Committer: Ingo Molnar mi...@kernel.org CommitDate: Thu, 24 Jan 2013 12:12:42 +0100 x86/apic: Remove noisy zero-mask warning from default_send_IPI_mask_logical() Since circa 3.5, we've had dozens of reports of people hitting this warning. Forwarded reports have been met with silence, so just remove the warning if no-one cares. Example reports: https://bugzilla.redhat.com/show_bug.cgi?id=797687 https://bugzilla.redhat.com/show_bug.cgi?id=867174 https://bugzilla.redhat.com/show_bug.cgi?id=894865 Signed-off-by: Dave Jones da...@redhat.com Cc: Andrew Morton a...@linux-foundation.org Link: http://lkml.kernel.org/r/20130118175847.ga27...@redhat.com Signed-off-by: Ingo Molnar mi...@kernel.org --- arch/x86/kernel/apic/ipi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/apic/ipi.c b/arch/x86/kernel/apic/ipi.c index cce91bf..7434d85 100644 --- a/arch/x86/kernel/apic/ipi.c +++ b/arch/x86/kernel/apic/ipi.c @@ -106,7 +106,7 @@ void default_send_IPI_mask_logical(const struct cpumask *cpumask, int vector) unsigned long mask = cpumask_bits(cpumask)[0]; unsigned long flags; - if (WARN_ONCE(!mask, empty IPI mask)) + if (!mask) return; local_irq_save(flags); -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/