aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-02-23 12:56:00 -0500
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-05-06 02:16:57 -0400
commit108aae22339f445c134aeb48eca25df1014ab08d (patch)
tree34a5ecb48e93726932004d36edcd60275cd47ce6
parent561190e3b3db372403fb6a327b0121b4cae1b87e (diff)
rcu: Use WARN_ON_ONCE for DEBUG_OBJECTS_RCU_HEAD warnings
Avoid additional multiple-warning confusion in memory-corruption scenarios. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
-rw-r--r--kernel/rcupdate.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c
index b54d6d18258c..7784bd216b6a 100644
--- a/kernel/rcupdate.c
+++ b/kernel/rcupdate.c
@@ -147,12 +147,12 @@ static int rcuhead_fixup_init(void *addr, enum debug_obj_state state)
147 * attempt any fixup and just print a warning. 147 * attempt any fixup and just print a warning.
148 */ 148 */
149#ifndef CONFIG_PREEMPT 149#ifndef CONFIG_PREEMPT
150 WARN_ON(1); 150 WARN_ON_ONCE(1);
151 return 0; 151 return 0;
152#endif 152#endif
153 if (rcu_preempt_depth() != 0 || preempt_count() != 0 || 153 if (rcu_preempt_depth() != 0 || preempt_count() != 0 ||
154 irqs_disabled()) { 154 irqs_disabled()) {
155 WARN_ON(1); 155 WARN_ON_ONCE(1);
156 return 0; 156 return 0;
157 } 157 }
158 rcu_barrier(); 158 rcu_barrier();
@@ -196,12 +196,12 @@ static int rcuhead_fixup_activate(void *addr, enum debug_obj_state state)
196 * attempt any fixup and just print a warning. 196 * attempt any fixup and just print a warning.
197 */ 197 */
198#ifndef CONFIG_PREEMPT 198#ifndef CONFIG_PREEMPT
199 WARN_ON(1); 199 WARN_ON_ONCE(1);
200 return 0; 200 return 0;
201#endif 201#endif
202 if (rcu_preempt_depth() != 0 || preempt_count() != 0 || 202 if (rcu_preempt_depth() != 0 || preempt_count() != 0 ||
203 irqs_disabled()) { 203 irqs_disabled()) {
204 WARN_ON(1); 204 WARN_ON_ONCE(1);
205 return 0; 205 return 0;
206 } 206 }
207 rcu_barrier(); 207 rcu_barrier();
@@ -233,12 +233,12 @@ static int rcuhead_fixup_free(void *addr, enum debug_obj_state state)
233 * attempt any fixup and just print a warning. 233 * attempt any fixup and just print a warning.
234 */ 234 */
235#ifndef CONFIG_PREEMPT 235#ifndef CONFIG_PREEMPT
236 WARN_ON(1); 236 WARN_ON_ONCE(1);
237 return 0; 237 return 0;
238#endif 238#endif
239 if (rcu_preempt_depth() != 0 || preempt_count() != 0 || 239 if (rcu_preempt_depth() != 0 || preempt_count() != 0 ||
240 irqs_disabled()) { 240 irqs_disabled()) {
241 WARN_ON(1); 241 WARN_ON_ONCE(1);
242 return 0; 242 return 0;
243 } 243 }
244 rcu_barrier(); 244 rcu_barrier();