.. | .. |
---|
83 | 83 | |
---|
84 | 84 | /* Internal to kernel */ |
---|
85 | 85 | void rcu_init(void); |
---|
86 | | -extern int rcu_scheduler_active __read_mostly; |
---|
| 86 | +extern int rcu_scheduler_active; |
---|
87 | 87 | void rcu_sched_clock_irq(int user); |
---|
88 | 88 | void rcu_report_dead(unsigned int cpu); |
---|
89 | 89 | void rcutree_migrate_callbacks(int cpu); |
---|
.. | .. |
---|
189 | 189 | |
---|
190 | 190 | #define rcu_note_voluntary_context_switch(t) rcu_tasks_qs(t, false) |
---|
191 | 191 | void exit_tasks_rcu_start(void); |
---|
| 192 | +void exit_tasks_rcu_stop(void); |
---|
192 | 193 | void exit_tasks_rcu_finish(void); |
---|
193 | 194 | #else /* #ifdef CONFIG_TASKS_RCU_GENERIC */ |
---|
194 | 195 | #define rcu_tasks_qs(t, preempt) do { } while (0) |
---|
.. | .. |
---|
196 | 197 | #define call_rcu_tasks call_rcu |
---|
197 | 198 | #define synchronize_rcu_tasks synchronize_rcu |
---|
198 | 199 | static inline void exit_tasks_rcu_start(void) { } |
---|
| 200 | +static inline void exit_tasks_rcu_stop(void) { } |
---|
199 | 201 | static inline void exit_tasks_rcu_finish(void) { } |
---|
200 | 202 | #endif /* #else #ifdef CONFIG_TASKS_RCU_GENERIC */ |
---|
201 | 203 | |
---|
.. | .. |
---|
306 | 308 | * RCU_LOCKDEP_WARN - emit lockdep splat if specified condition is met |
---|
307 | 309 | * @c: condition to check |
---|
308 | 310 | * @s: informative message |
---|
| 311 | + * |
---|
| 312 | + * This checks debug_lockdep_rcu_enabled() before checking (c) to |
---|
| 313 | + * prevent early boot splats due to lockdep not yet being initialized, |
---|
| 314 | + * and rechecks it after checking (c) to prevent false-positive splats |
---|
| 315 | + * due to races with lockdep being disabled. See commit 3066820034b5dd |
---|
| 316 | + * ("rcu: Reject RCU_LOCKDEP_WARN() false positives") for more detail. |
---|
309 | 317 | */ |
---|
310 | 318 | #define RCU_LOCKDEP_WARN(c, s) \ |
---|
311 | 319 | do { \ |
---|
312 | 320 | static bool __section(".data.unlikely") __warned; \ |
---|
313 | | - if ((c) && debug_lockdep_rcu_enabled() && !__warned) { \ |
---|
| 321 | + if (debug_lockdep_rcu_enabled() && (c) && \ |
---|
| 322 | + debug_lockdep_rcu_enabled() && !__warned) { \ |
---|
314 | 323 | __warned = true; \ |
---|
315 | 324 | lockdep_rcu_suspicious(__FILE__, __LINE__, s); \ |
---|
316 | 325 | } \ |
---|