summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ae67cd6)
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>
memset(mcelog.entry, 0, next * sizeof(struct mce));
mcelog.next = 0;
memset(mcelog.entry, 0, next * sizeof(struct mce));
mcelog.next = 0;
/* Collect entries that were still getting written before the synchronize. */
/* Collect entries that were still getting written before the synchronize. */
struct i8042_port *port = serio->port_data;
port->exists = 0;
struct i8042_port *port = serio->port_data;
port->exists = 0;
};
/* Note - you should never unregister because that can race with NMIs.
};
/* Note - you should never unregister because that can race with NMIs.
- If you really want to do it first unregister - then synchronize_kernel - then free.
+ If you really want to do it first unregister - then synchronize_sched - then free.
*/
int register_die_notifier(struct notifier_block *nb);
extern struct notifier_block *i386die_chain;
*/
int register_die_notifier(struct notifier_block *nb);
extern struct notifier_block *i386die_chain;
/*
Note - you should never unregister because that can race with NMIs.
/*
Note - you should never unregister because that can race with NMIs.
- If you really want to do it first unregister - then synchronize_kernel -
+ If you really want to do it first unregister - then synchronize_sched -
then free.
*/
int register_die_notifier(struct notifier_block *nb);
then free.
*/
int register_die_notifier(struct notifier_block *nb);
};
/* Note - you should never unregister because that can race with NMIs.
};
/* Note - you should never unregister because that can race with NMIs.
- * If you really want to do it first unregister - then synchronize_kernel
+ * If you really want to do it first unregister - then synchronize_sched
* - then free.
*/
int register_die_notifier(struct notifier_block *nb);
* - then free.
*/
int register_die_notifier(struct notifier_block *nb);
};
/* Note - you should never unregister because that can race with NMIs.
};
/* Note - you should never unregister because that can race with NMIs.
- If you really want to do it first unregister - then synchronize_kernel - then free.
+ If you really want to do it first unregister - then synchronize_sched - then free.
*/
int register_die_notifier(struct notifier_block *nb);
extern struct notifier_block *die_chain;
*/
int register_die_notifier(struct notifier_block *nb);
extern struct notifier_block *die_chain;
* list_for_each_entry_rcu().
*
* Note that the caller is not permitted to immediately free
* list_for_each_entry_rcu().
*
* Note that the caller is not permitted to immediately free
- * the newly deleted entry. Instead, either synchronize_kernel()
+ * the newly deleted entry. Instead, either synchronize_rcu()
* or call_rcu() must be used to defer freeing until an RCU
* grace period has elapsed.
*/
* or call_rcu() must be used to defer freeing until an RCU
* grace period has elapsed.
*/
spin_unlock(&key_serial_lock);
/* make sure everyone revalidates their keys */
spin_unlock(&key_serial_lock);
/* make sure everyone revalidates their keys */
/* we should now be able to destroy the payloads of all the keys of
* this type with impunity */
/* we should now be able to destroy the payloads of all the keys of
* this type with impunity */
ret = 0;
/* we're using RCU on the pointer */
ret = 0;
/* we're using RCU on the pointer */
key_put(old);
error:
return ret;
key_put(old);
error:
return ret;