lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-a461d58792d4a46b8b10ae50973ec9b2763b694e@git.kernel.org>
Date:	Wed, 8 Jun 2016 07:19:11 -0700
From:	tip-bot for Sebastian Andrzej Siewior <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	bigeasy@...utronix.de, paulmck@...ux.vnet.ibm.com,
	mingo@...nel.org, hpa@...or.com, akpm@...ux-foundation.org,
	peterz@...radead.org, linux-kernel@...r.kernel.org,
	tglx@...utronix.de, torvalds@...ux-foundation.org
Subject: [tip:locking/core] locking/rtmutex: Only warn once on a trylock
 from bad context

Commit-ID:  a461d58792d4a46b8b10ae50973ec9b2763b694e
Gitweb:     http://git.kernel.org/tip/a461d58792d4a46b8b10ae50973ec9b2763b694e
Author:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>
AuthorDate: Fri, 27 May 2016 15:47:18 +0200
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 8 Jun 2016 14:22:00 +0200

locking/rtmutex: Only warn once on a trylock from bad context

One warning should be enough to get one motivated to fix this. It is
possible that this happens more than once and that starts flooding the
output. Later the prints will be suppressed so we only get half of it.
Depending on the console system used it might not be helpful.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/1464356838-1755-1-git-send-email-bigeasy@linutronix.de
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 kernel/locking/rtmutex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index 3e74660..1ec0f48 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c
@@ -1478,7 +1478,7 @@ EXPORT_SYMBOL_GPL(rt_mutex_timed_lock);
  */
 int __sched rt_mutex_trylock(struct rt_mutex *lock)
 {
-	if (WARN_ON(in_irq() || in_nmi() || in_serving_softirq()))
+	if (WARN_ON_ONCE(in_irq() || in_nmi() || in_serving_softirq()))
 		return 0;
 
 	return rt_mutex_fasttrylock(lock, rt_mutex_slowtrylock);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ