]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/blob - rt-patches/0344-kernel-rtmutex-only-warn-once-on-a-try-lock-from-bad.patch
rt_patches: required rebase due to printk change
[hercules2020/nv-tegra/linux-4.4.git] / rt-patches / 0344-kernel-rtmutex-only-warn-once-on-a-try-lock-from-bad.patch
1 From c330b615c9f8d57827eeddab58bbcc3af4f7d969 Mon Sep 17 00:00:00 2001
2 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
3 Date: Thu, 19 May 2016 17:12:34 +0200
4 Subject: [PATCH 344/366] kernel/rtmutex: only warn once on a try lock from bad
5  context
6
7 One warning should be enough to get one motivated to fix this. It is
8 possible that this happens more than once and so starts flooding the
9 output. Later the prints will be suppressed so we only get half of it.
10 Depending on the console system used it might not be helpfull.
11
12 Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
13 ---
14  kernel/locking/rtmutex.c | 2 +-
15  1 file changed, 1 insertion(+), 1 deletion(-)
16
17 diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
18 index 6697100..fde5e54 100644
19 --- a/kernel/locking/rtmutex.c
20 +++ b/kernel/locking/rtmutex.c
21 @@ -2059,7 +2059,7 @@ EXPORT_SYMBOL_GPL(rt_mutex_timed_lock);
22  int __sched rt_mutex_trylock(struct rt_mutex *lock)
23  {
24  #ifdef CONFIG_PREEMPT_RT_FULL
25 -       if (WARN_ON(in_irq() || in_nmi()))
26 +       if (WARN_ON_ONCE(in_irq() || in_nmi()))
27  #else
28         if (WARN_ON(in_irq() || in_nmi() || in_serving_softirq()))
29  #endif
30 -- 
31 1.9.1
32