diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/rcupdate.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index e1bdc4bfd275..872a98e13d6a 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -149,7 +149,7 @@ static inline int rcu_read_lock_sched_held(void) | |||
149 | return 1; | 149 | return 1; |
150 | if (debug_locks) | 150 | if (debug_locks) |
151 | lockdep_opinion = lock_is_held(&rcu_sched_lock_map); | 151 | lockdep_opinion = lock_is_held(&rcu_sched_lock_map); |
152 | return lockdep_opinion || preempt_count() != 0; | 152 | return lockdep_opinion || preempt_count() != 0 || irqs_disabled(); |
153 | } | 153 | } |
154 | #else /* #ifdef CONFIG_PREEMPT */ | 154 | #else /* #ifdef CONFIG_PREEMPT */ |
155 | static inline int rcu_read_lock_sched_held(void) | 155 | static inline int rcu_read_lock_sched_held(void) |
@@ -180,7 +180,7 @@ static inline int rcu_read_lock_bh_held(void) | |||
180 | #ifdef CONFIG_PREEMPT | 180 | #ifdef CONFIG_PREEMPT |
181 | static inline int rcu_read_lock_sched_held(void) | 181 | static inline int rcu_read_lock_sched_held(void) |
182 | { | 182 | { |
183 | return !rcu_scheduler_active || preempt_count() != 0; | 183 | return !rcu_scheduler_active || preempt_count() != 0 || irqs_disabled(); |
184 | } | 184 | } |
185 | #else /* #ifdef CONFIG_PREEMPT */ | 185 | #else /* #ifdef CONFIG_PREEMPT */ |
186 | static inline int rcu_read_lock_sched_held(void) | 186 | static inline int rcu_read_lock_sched_held(void) |