The warning was intended to spot complete_all() users from hardirq context on PREEMPT_RT. The warning as-is will also trigger in interrupt handlers, which are threaded on PREEMPT_RT, which was not intended. Use lockdep_assert_RT_in_threaded_ctx() which triggers in non-preemptive context on PREEMPT_RT.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -711,6 +711,21 @@ do { \ · 710 unmodified lines | |||
| 711 | # define lockdep_assert_in_irq() do { } while (0) | 711 | # define lockdep_assert_in_irq() do { } while (0) |
| 712 | #endif | 712 | #endif |
| 713 | 713 | ||
| 714 | #ifdef CONFIG_PROVE_RAW_LOCK_NESTING | ||
| 715 | |||
| 716 | # define lockdep_assert_RT_in_threaded_ctx() do { \ | ||
| 717 | WARN_ONCE(debug_locks && !current->lockdep_recursion && \ | ||
| 718 | current->hardirq_context && \ | ||
| 719 | !(current->hardirq_threaded || current->irq_config), \ | ||
| 720 | "Not in threaded context on PREEMPT_RT as expected\n"); \ | ||
| 721 | } while (0) | ||
| 722 | |||
| 723 | #else | ||
| 724 | |||
| 725 | # define lockdep_assert_RT_in_threaded_ctx() do { } while (0) | ||
| 726 | |||
| 727 | #endif | ||
| 728 | |||
| 714 | #ifdef CONFIG_LOCKDEP | 729 | #ifdef CONFIG_LOCKDEP |
| 715 | void lockdep_rcu_suspicious(const char *file, const int line, const char *s); | 730 | void lockdep_rcu_suspicious(const char *file, const int line, const char *s); |
| 716 | #else | 731 | #else |