[IA64-SGI] XPC and unregistering from notifier lists
authorDean Nelson <dcn@sgi.com>
Tue, 10 Jan 2006 17:07:19 +0000 (11:07 -0600)
committerTony Luck <tony.luck@intel.com>
Fri, 13 Jan 2006 18:33:44 +0000 (10:33 -0800)
Only unregister from notifier lists if XPC is unloading.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/sn/kernel/xpc_main.c

index 948206b13f683754bc50b891b19830e3a8a3faf5..dcac286dab32260367671f6984f73d93e0a0ba75 100644 (file)
@@ -1022,11 +1022,13 @@ xpc_do_exit(enum xpc_retval reason)
        del_timer_sync(&xpc_hb_timer);
        DBUG_ON(xpc_vars->heartbeating_to_mask != 0);
 
-       /* take ourselves off of the reboot_notifier_list */
-       (void) unregister_reboot_notifier(&xpc_reboot_notifier);
+       if (reason == xpcUnloading) {
+               /* take ourselves off of the reboot_notifier_list */
+               (void) unregister_reboot_notifier(&xpc_reboot_notifier);
 
-       /* take ourselves off of the die_notifier list */
-       (void) unregister_die_notifier(&xpc_die_notifier);
+               /* take ourselves off of the die_notifier list */
+               (void) unregister_die_notifier(&xpc_die_notifier);
+       }
 
        /* close down protections for IPI operations */
        xpc_restrict_IPI_ops();