[PATCH tip/core/rcu 30/48] mce: convert to rcu_dereference_index_check()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul E. McKenney
Date: Tuesday, May 4, 2010 - 1:19 pm

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>
---
 arch/x86/kernel/cpu/mcheck/mce.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 8a6f0af..f00a9f2 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -50,7 +50,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))
 
-- 
1.7.0

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH tip/core/rcu 03/48] rcu: make dead code really dead, Paul E. McKenney, (Tue May 4, 1:19 pm)
[PATCH tip/core/rcu 19/48] Debugobjects transition check, Paul E. McKenney, (Tue May 4, 1:19 pm)
[PATCH tip/core/rcu 22/48] rcu head remove init, Paul E. McKenney, (Tue May 4, 1:19 pm)
[PATCH tip/core/rcu 24/48] rcu: make SRCU usable in modules, Paul E. McKenney, (Tue May 4, 1:19 pm)
[PATCH tip/core/rcu 0/48] v4 patches queued for 2.6.35, Paul E. McKenney, (Tue May 4, 1:19 pm)
[PATCH tip/core/rcu 30/48] mce: convert to rcu_dereference ..., Paul E. McKenney, (Tue May 4, 1:19 pm)
[PATCH tip/core/rcu 32/48] rculist: avoid __rcu annotations, Paul E. McKenney, (Tue May 4, 1:19 pm)
[PATCH tip/core/rcu 33/48] cgroups: __rcu annotations, Paul E. McKenney, (Tue May 4, 1:19 pm)
[PATCH tip/core/rcu 34/48] credentials: rcu annotation, Paul E. McKenney, (Tue May 4, 1:19 pm)
[PATCH tip/core/rcu 35/48] keys: __rcu annotations, Paul E. McKenney, (Tue May 4, 1:19 pm)
[PATCH tip/core/rcu 36/48] nfs: __rcu annotations, Paul E. McKenney, (Tue May 4, 1:19 pm)
[PATCH tip/core/rcu 38/48] perf_event: __rcu annotations, Paul E. McKenney, (Tue May 4, 1:19 pm)
[PATCH tip/core/rcu 39/48] notifiers: __rcu annotations, Paul E. McKenney, (Tue May 4, 1:19 pm)
[PATCH tip/core/rcu 40/48] radix-tree: __rcu annotations, Paul E. McKenney, (Tue May 4, 1:19 pm)
[PATCH tip/core/rcu 41/48] idr: __rcu annotations, Paul E. McKenney, (Tue May 4, 1:19 pm)
[PATCH tip/core/rcu 42/48] input: __rcu annotations, Paul E. McKenney, (Tue May 4, 1:19 pm)
[PATCH tip/core/rcu 43/48] vhost: add __rcu annotations, Paul E. McKenney, (Tue May 4, 1:19 pm)
[PATCH tip/core/rcu 44/48] net/netfilter: __rcu annotations, Paul E. McKenney, (Tue May 4, 1:19 pm)
[PATCH tip/core/rcu 45/48] kvm: add __rcu annotations, Paul E. McKenney, (Tue May 4, 1:19 pm)
[PATCH tip/core/rcu 46/48] kernel: __rcu annotations, Paul E. McKenney, (Tue May 4, 1:19 pm)
[PATCH tip/core/rcu 47/48] net: __rcu annotations, Paul E. McKenney, (Tue May 4, 1:19 pm)
[PATCH tip/core/rcu 48/48] kvm: more __rcu annotations, Paul E. McKenney, (Tue May 4, 1:19 pm)
Re: [PATCH tip/core/rcu 43/48] vhost: add __rcu annotations, Michael S. Tsirkin, (Tue May 4, 2:39 pm)
Re: [PATCH tip/core/rcu 43/48] vhost: add __rcu annotations, Paul E. McKenney, (Tue May 4, 4:57 pm)
Re: [PATCH tip/core/rcu 43/48] vhost: add __rcu annotations, Michael S. Tsirkin, (Tue May 4, 4:59 pm)
Re: [PATCH tip/core/rcu 33/48] cgroups: __rcu annotations, Paul E. McKenney, (Tue May 4, 5:04 pm)
Re: [PATCH tip/core/rcu 43/48] vhost: add __rcu annotations, Paul E. McKenney, (Tue May 4, 5:39 pm)
Re: [PATCH tip/core/rcu 36/48] nfs: __rcu annotations, David Howells, (Wed May 5, 3:14 am)
Re: [PATCH tip/core/rcu 36/48] nfs: __rcu annotations, Trond Myklebust, (Wed May 5, 5:44 am)
Re: [PATCH tip/core/rcu 36/48] nfs: __rcu annotations, Paul E. McKenney, (Wed May 5, 2:01 pm)