aboutsummaryrefslogtreecommitdiffstats
path: root/security/keys
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@us.ibm.com>2005-06-25 14:55:38 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 16:24:38 -0700
commitb2b18660066997420b716c1881a6be8b82700d97 (patch)
tree7c6eb8e7b8163e3d332bd4a4efe2ae5b5cfabdd2 /security/keys
parentae67cd643e9e64217fd92457324625c67fec6e35 (diff)
downloadkernel_samsung_smdk4412-b2b18660066997420b716c1881a6be8b82700d97.zip
kernel_samsung_smdk4412-b2b18660066997420b716c1881a6be8b82700d97.tar.gz
kernel_samsung_smdk4412-b2b18660066997420b716c1881a6be8b82700d97.tar.bz2
[PATCH] RCU: clean up a few remaining synchronize_kernel() calls
2.6.12-rc6-mm1 has a few remaining synchronize_kernel()s, some (but not all) in comments. This patch changes these synchronize_kernel() calls (and comments) to synchronize_rcu() or synchronize_sched() as follows: - arch/x86_64/kernel/mce.c mce_read(): change to synchronize_sched() to handle races with machine-check exceptions (synchronize_rcu() would not cut it given RCU implementations intended for hardcore realtime use. - drivers/input/serio/i8042.c i8042_stop(): change to synchronize_sched() to handle races with i8042_interrupt() interrupt handler. Again, synchronize_rcu() would not cut it given RCU implementations intended for hardcore realtime use. - include/*/kdebug.h comments: change to synchronize_sched() to handle races with NMIs. As before, synchronize_rcu() would not cut it... - include/linux/list.h comment: change to synchronize_rcu(), since this comment is for list_del_rcu(). - security/keys/key.c unregister_key_type(): change to synchronize_rcu(), since this is interacting with RCU read side. - security/keys/process_keys.c install_session_keyring(): change to synchronize_rcu(), since this is interacting with RCU read side. Signed-off-by: "Paul E. McKenney" <paulmck@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'security/keys')
-rw-r--r--security/keys/key.c2
-rw-r--r--security/keys/process_keys.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/security/keys/key.c b/security/keys/key.c
index 3304d37..fb89f98 100644
--- a/security/keys/key.c
+++ b/security/keys/key.c
@@ -980,7 +980,7 @@ void unregister_key_type(struct key_type *ktype)
spin_unlock(&key_serial_lock);
/* make sure everyone revalidates their keys */
- synchronize_kernel();
+ synchronize_rcu();
/* we should now be able to destroy the payloads of all the keys of
* this type with impunity */
diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c
index 34db087..9b0369c 100644
--- a/security/keys/process_keys.c
+++ b/security/keys/process_keys.c
@@ -234,7 +234,7 @@ static int install_session_keyring(struct task_struct *tsk,
ret = 0;
/* we're using RCU on the pointer */
- synchronize_kernel();
+ synchronize_rcu();
key_put(old);
error:
return ret;