diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 11:10:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 11:10:07 -0400 |
commit | 016aa2ed1cc9cf704cf76d8df07751b6daa9750f (patch) | |
tree | bebfea796fbcaed6995f41cb4ab1333a0e09a1ff /kernel | |
parent | 34d211a2d5df4984a35b18d8ccacbe1d10abb067 (diff) | |
parent | 241e6663b5151733294d1a230a3fd8a4d32e187f (diff) |
Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
smp: Document transitivity for memory barriers.
rcu: add comment saying why DEBUG_OBJECTS_RCU_HEAD depends on PREEMPT.
rcupdate: remove dead code
rcu: add documentation saying which RCU flavor to choose
rcutorture: Get rid of duplicate sched.h include
rcu: call __rcu_read_unlock() in exit_rcu for tiny RCU
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/rcupdate.c | 10 | ||||
-rw-r--r-- | kernel/rcutiny_plugin.h | 2 | ||||
-rw-r--r-- | kernel/rcutorture.c | 1 |
3 files changed, 6 insertions, 7 deletions
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c index a23a57a976d..f3240e98792 100644 --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c | |||
@@ -214,11 +214,12 @@ static int rcuhead_fixup_free(void *addr, enum debug_obj_state state) | |||
214 | * Ensure that queued callbacks are all executed. | 214 | * Ensure that queued callbacks are all executed. |
215 | * If we detect that we are nested in a RCU read-side critical | 215 | * If we detect that we are nested in a RCU read-side critical |
216 | * section, we should simply fail, otherwise we would deadlock. | 216 | * section, we should simply fail, otherwise we would deadlock. |
217 | * Note that the machinery to reliably determine whether | ||
218 | * or not we are in an RCU read-side critical section | ||
219 | * exists only in the preemptible RCU implementations | ||
220 | * (TINY_PREEMPT_RCU and TREE_PREEMPT_RCU), which is why | ||
221 | * DEBUG_OBJECTS_RCU_HEAD is disallowed if !PREEMPT. | ||
217 | */ | 222 | */ |
218 | #ifndef CONFIG_PREEMPT | ||
219 | WARN_ON(1); | ||
220 | return 0; | ||
221 | #else | ||
222 | if (rcu_preempt_depth() != 0 || preempt_count() != 0 || | 223 | if (rcu_preempt_depth() != 0 || preempt_count() != 0 || |
223 | irqs_disabled()) { | 224 | irqs_disabled()) { |
224 | WARN_ON(1); | 225 | WARN_ON(1); |
@@ -229,7 +230,6 @@ static int rcuhead_fixup_free(void *addr, enum debug_obj_state state) | |||
229 | rcu_barrier_bh(); | 230 | rcu_barrier_bh(); |
230 | debug_object_free(head, &rcuhead_debug_descr); | 231 | debug_object_free(head, &rcuhead_debug_descr); |
231 | return 1; | 232 | return 1; |
232 | #endif | ||
233 | default: | 233 | default: |
234 | return 0; | 234 | return 0; |
235 | } | 235 | } |
diff --git a/kernel/rcutiny_plugin.h b/kernel/rcutiny_plugin.h index 015abaea962..3cb8e362e88 100644 --- a/kernel/rcutiny_plugin.h +++ b/kernel/rcutiny_plugin.h | |||
@@ -852,7 +852,7 @@ void exit_rcu(void) | |||
852 | if (t->rcu_read_lock_nesting == 0) | 852 | if (t->rcu_read_lock_nesting == 0) |
853 | return; | 853 | return; |
854 | t->rcu_read_lock_nesting = 1; | 854 | t->rcu_read_lock_nesting = 1; |
855 | rcu_read_unlock(); | 855 | __rcu_read_unlock(); |
856 | } | 856 | } |
857 | 857 | ||
858 | #else /* #ifdef CONFIG_TINY_PREEMPT_RCU */ | 858 | #else /* #ifdef CONFIG_TINY_PREEMPT_RCU */ |
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c index 89613f97ff2..c224da41890 100644 --- a/kernel/rcutorture.c +++ b/kernel/rcutorture.c | |||
@@ -47,7 +47,6 @@ | |||
47 | #include <linux/srcu.h> | 47 | #include <linux/srcu.h> |
48 | #include <linux/slab.h> | 48 | #include <linux/slab.h> |
49 | #include <asm/byteorder.h> | 49 | #include <asm/byteorder.h> |
50 | #include <linux/sched.h> | ||
51 | 50 | ||
52 | MODULE_LICENSE("GPL"); | 51 | MODULE_LICENSE("GPL"); |
53 | MODULE_AUTHOR("Paul E. McKenney <paulmck@us.ibm.com> and " | 52 | MODULE_AUTHOR("Paul E. McKenney <paulmck@us.ibm.com> and " |