diff options
| author | Takashi Iwai <tiwai@suse.de> | 2010-04-16 15:20:06 +0200 | 
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2010-04-16 15:20:06 +0200 | 
| commit | cf0dbba515415bb19b11f9323d5f7bebd7f24fd6 (patch) | |
| tree | 375bbc1ade1a92acd6493d224dd701fd7f209014 /kernel/rcupdate.c | |
| parent | 1cff399ecd9125d8e6a634a1957be1aeb3195a12 (diff) | |
| parent | 0340c7dccd80d8706c636e030a6ebbddbddca690 (diff) | |
Merge remote branch 'alsa/devel' into topic/misc
Diffstat (limited to 'kernel/rcupdate.c')
| -rw-r--r-- | kernel/rcupdate.c | 23 | 
1 files changed, 23 insertions, 0 deletions
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c index f1125c1a6321..63fe25433980 100644 --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c @@ -45,6 +45,7 @@  #include <linux/mutex.h>  #include <linux/module.h>  #include <linux/kernel_stat.h> +#include <linux/hardirq.h>  #ifdef CONFIG_DEBUG_LOCK_ALLOC  static struct lock_class_key rcu_lock_key; @@ -66,6 +67,28 @@ EXPORT_SYMBOL_GPL(rcu_sched_lock_map);  int rcu_scheduler_active __read_mostly;  EXPORT_SYMBOL_GPL(rcu_scheduler_active); +#ifdef CONFIG_DEBUG_LOCK_ALLOC + +/** + * rcu_read_lock_bh_held - might we be in RCU-bh read-side critical section? + * + * Check for bottom half being disabled, which covers both the + * CONFIG_PROVE_RCU and not cases.  Note that if someone uses + * rcu_read_lock_bh(), but then later enables BH, lockdep (if enabled) + * will show the situation. + * + * Check debug_lockdep_rcu_enabled() to prevent false positives during boot. + */ +int rcu_read_lock_bh_held(void) +{ +	if (!debug_lockdep_rcu_enabled()) +		return 1; +	return in_softirq(); +} +EXPORT_SYMBOL_GPL(rcu_read_lock_bh_held); + +#endif /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ +  /*   * This function is invoked towards the end of the scheduler's initialization   * process.  Before this is called, the idle task might contain  | 
