Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1615035 > unrolled thread

[GIT pull] ras fix for 4.11

Started byThomas Gleixner <tglx@linutronix.de>
First post2017-04-03 11:50 +0200
Last post2017-04-03 11:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [GIT pull] ras fix for 4.11 Thomas Gleixner <tglx@linutronix.de> - 2017-04-03 11:50 +0200

#1615035 — [GIT pull] ras fix for 4.11

FromThomas Gleixner <tglx@linutronix.de>
Date2017-04-03 11:50 +0200
Subject[GIT pull] ras fix for 4.11
Message-ID<ts6Mx-55V-3@gated-at.bofh.it>
Linus,

please pull the latest ras-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git ras-urgent-for-linus

Prevent dmesg from being spammed when MCE logging is active.

Thanks,

	tglx

------------------>
Andi Kleen (1):
      x86/mce: Don't print MCEs when mcelog is active


 arch/x86/kernel/cpu/mcheck/mce.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 8e9725c607ea..5accfbdee3f0 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -54,6 +54,8 @@
 
 static DEFINE_MUTEX(mce_chrdev_read_mutex);
 
+static int mce_chrdev_open_count;	/* #times opened */
+
 #define mce_log_get_idx_check(p) \
 ({ \
 	RCU_LOCKDEP_WARN(!rcu_read_lock_sched_held() && \
@@ -598,6 +600,10 @@ static int mce_default_notifier(struct notifier_block *nb, unsigned long val,
 	if (atomic_read(&num_notifiers) > 2)
 		return NOTIFY_DONE;
 
+	/* Don't print when mcelog is running */
+	if (mce_chrdev_open_count > 0)
+		return NOTIFY_DONE;
+
 	__print_mce(m);
 
 	return NOTIFY_DONE;
@@ -1828,7 +1834,6 @@ void mcheck_cpu_clear(struct cpuinfo_x86 *c)
  */
 
 static DEFINE_SPINLOCK(mce_chrdev_state_lock);
-static int mce_chrdev_open_count;	/* #times opened */
 static int mce_chrdev_open_exclu;	/* already open exclusive? */
 
 static int mce_chrdev_open(struct inode *inode, struct file *file)

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web