diff options
Diffstat (limited to 'kernel/rcupdate.c')
| -rw-r--r-- | kernel/rcupdate.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c index 4d169835fb36..a23a57a976d1 100644 --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c | |||
| @@ -73,12 +73,14 @@ int debug_lockdep_rcu_enabled(void) | |||
| 73 | EXPORT_SYMBOL_GPL(debug_lockdep_rcu_enabled); | 73 | EXPORT_SYMBOL_GPL(debug_lockdep_rcu_enabled); |
| 74 | 74 | ||
| 75 | /** | 75 | /** |
| 76 | * rcu_read_lock_bh_held - might we be in RCU-bh read-side critical section? | 76 | * rcu_read_lock_bh_held() - might we be in RCU-bh read-side critical section? |
| 77 | * | 77 | * |
| 78 | * Check for bottom half being disabled, which covers both the | 78 | * Check for bottom half being disabled, which covers both the |
| 79 | * CONFIG_PROVE_RCU and not cases. Note that if someone uses | 79 | * CONFIG_PROVE_RCU and not cases. Note that if someone uses |
| 80 | * rcu_read_lock_bh(), but then later enables BH, lockdep (if enabled) | 80 | * rcu_read_lock_bh(), but then later enables BH, lockdep (if enabled) |
| 81 | * will show the situation. | 81 | * will show the situation. This is useful for debug checks in functions |
| 82 | * that require that they be called within an RCU read-side critical | ||
| 83 | * section. | ||
| 82 | * | 84 | * |
| 83 | * Check debug_lockdep_rcu_enabled() to prevent false positives during boot. | 85 | * Check debug_lockdep_rcu_enabled() to prevent false positives during boot. |
| 84 | */ | 86 | */ |
| @@ -86,7 +88,7 @@ int rcu_read_lock_bh_held(void) | |||
| 86 | { | 88 | { |
| 87 | if (!debug_lockdep_rcu_enabled()) | 89 | if (!debug_lockdep_rcu_enabled()) |
| 88 | return 1; | 90 | return 1; |
| 89 | return in_softirq(); | 91 | return in_softirq() || irqs_disabled(); |
| 90 | } | 92 | } |
| 91 | EXPORT_SYMBOL_GPL(rcu_read_lock_bh_held); | 93 | EXPORT_SYMBOL_GPL(rcu_read_lock_bh_held); |
| 92 | 94 | ||
