Skip to content

Commit

Permalink
mce: convert to rcu_dereference_index_check()
Browse files Browse the repository at this point in the history
The mce processing applies rcu_dereference_check() to integers used as
array indices.  This patch therefore moves mce to the new RCU API
rcu_dereference_index_check() that avoids the sparse processing that
would otherwise result in compiler errors.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
  • Loading branch information
Paul E. McKenney committed Jun 14, 2010
1 parent 81bdf5b commit ec8c27e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/cpu/mcheck/mce.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
static DEFINE_MUTEX(mce_read_mutex);

#define rcu_dereference_check_mce(p) \
rcu_dereference_check((p), \
rcu_dereference_index_check((p), \
rcu_read_lock_sched_held() || \
lockdep_is_held(&mce_read_mutex))

Expand Down

0 comments on commit ec8c27e

Please sign in to comment.