diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-09-03 17:04:48 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-09-03 17:04:48 -0400 |
commit | 83bb49a0d026aefb2d11361794314e7362eda334 (patch) | |
tree | 7e8ceb3b0094d35289f44dbb92c8e03d1b56efeb | |
parent | ea674ac7bb99916a16c4fc6cf2f3ee9b8827b539 (diff) | |
download | 4.8-rt-patches-83bb49a0d026aefb2d11361794314e7362eda334.tar.gz |
refresh: WARN_ON --> WARN_ON_ONCE in context
-rw-r--r-- | patches/rtmutex-trylock-is-okay-on-RT.patch | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/patches/rtmutex-trylock-is-okay-on-RT.patch b/patches/rtmutex-trylock-is-okay-on-RT.patch index 7f5cce5377440..a2a0598843006 100644 --- a/patches/rtmutex-trylock-is-okay-on-RT.patch +++ b/patches/rtmutex-trylock-is-okay-on-RT.patch @@ -1,16 +1,16 @@ +From 29d4581cf0af36aaad98e6f5ed086da3de5aca08 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Wed 02 Dec 2015 11:34:07 +0100 -Subject: rtmutex: trylock is okay on -RT +Date: Wed, 2 Dec 2015 11:34:07 +0100 +Subject: [PATCH] rtmutex: trylock is okay on -RT non-RT kernel could deadlock on rt_mutex_trylock() in softirq context. On -RT we don't run softirqs in IRQ context but in thread context so it is not a issue here. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> ---- - kernel/locking/rtmutex.c | 4 ++++ - 1 file changed, 4 insertions(+) +diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c +index b03420a59548..6385fda390d1 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c @@ -1478,7 +1478,11 @@ EXPORT_SYMBOL_GPL(rt_mutex_timed_lock); @@ -20,8 +20,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +#ifdef CONFIG_PREEMPT_RT_FULL + if (WARN_ON(in_irq() || in_nmi())) +#else - if (WARN_ON(in_irq() || in_nmi() || in_serving_softirq())) + if (WARN_ON_ONCE(in_irq() || in_nmi() || in_serving_softirq())) +#endif return 0; return rt_mutex_fasttrylock(lock, rt_mutex_slowtrylock); +-- +2.5.0 + |