X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=kernel%2Fuser-return-notifier.c;h=eb27fd3430a291df4c714b1b462b69d5f9490366;hb=eca39dd830dbc58061aa6cd68853c39055236be3;hp=03e2d6fd9b18c99e6141f94f6f0a493ce0c8b133;hpb=3c912b6edaac56cb451e7571c95c15cbb6bd0c81;p=safe%2Fjmp%2Flinux-2.6 diff --git a/kernel/user-return-notifier.c b/kernel/user-return-notifier.c index 03e2d6f..eb27fd3 100644 --- a/kernel/user-return-notifier.c +++ b/kernel/user-return-notifier.c @@ -6,8 +6,6 @@ static DEFINE_PER_CPU(struct hlist_head, return_notifier_list); -#define URN_LIST_HEAD per_cpu(return_notifier_list, raw_smp_processor_id()) - /* * Request a notification when the current cpu returns to userspace. Must be * called in atomic context. The notifier will also be called in atomic @@ -16,7 +14,7 @@ static DEFINE_PER_CPU(struct hlist_head, return_notifier_list); void user_return_notifier_register(struct user_return_notifier *urn) { set_tsk_thread_flag(current, TIF_USER_RETURN_NOTIFY); - hlist_add_head(&urn->link, &URN_LIST_HEAD); + hlist_add_head(&urn->link, &__get_cpu_var(return_notifier_list)); } EXPORT_SYMBOL_GPL(user_return_notifier_register); @@ -27,7 +25,7 @@ EXPORT_SYMBOL_GPL(user_return_notifier_register); void user_return_notifier_unregister(struct user_return_notifier *urn) { hlist_del(&urn->link); - if (hlist_empty(&URN_LIST_HEAD)) + if (hlist_empty(&__get_cpu_var(return_notifier_list))) clear_tsk_thread_flag(current, TIF_USER_RETURN_NOTIFY); } EXPORT_SYMBOL_GPL(user_return_notifier_unregister);