search for: register_reboot_notifier

Displaying 5 results from an estimated 5 matches for "register_reboot_notifier".

2019 Jun 03
1
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...eller <mimu at linux.ibm.com> wrote: > >> @@ -1059,16 +1168,19 @@ static int __init css_bus_init(void) > >> if (ret) > >> goto out_unregister; > >> ret = register_pm_notifier(&css_power_notifier); > >> - if (ret) { > >> - unregister_reboot_notifier(&css_reboot_notifier); > >> - goto out_unregister; > >> - } > >> + if (ret) > >> + goto out_unregister_rn; > >> + ret = cio_dma_pool_init(); > >> + if (ret) > >> + goto out_unregister_rn; > > > > Don't you also...
2013 Nov 08
4
[PATCH 3/4] xen/manage: Guard against user-space initiated poweroff and XenBus.
...watch = { .callback = shutdown_handler }; +static struct notifier_block xen_shutdown_notifier = { + .notifier_call = xen_system_reboot, +}; + static int setup_shutdown_watcher(void) { int err; @@ -319,7 +348,11 @@ static int setup_shutdown_watcher(void) return err; } #endif - + err = register_reboot_notifier(&xen_shutdown_notifier); + if (err) { + pr_warn("Failed to register shutdown notifier\n"); + return err; + } return 0; } -- 1.8.3.1
2020 Feb 12
5
[PATCH 0/5] x86/vmware: Steal time accounting support
Hello, This patchset introduces steal time accounting support for the VMware guest. The idea and implementation of guest steal time support is similar to KVM ones and it is based on steal clock. The steal clock is a per CPU structure in a shared memory between hypervisor and guest, initialized by each CPU through hypercall. Steal clock is got updated by the hypervisor and read by the guest. The
2019 Jun 03
5
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...sk; > > mutex_init(&css->mutex); > css->cssid = chsc_get_cssid(nr); (...) > @@ -1059,16 +1168,19 @@ static int __init css_bus_init(void) > if (ret) > goto out_unregister; > ret = register_pm_notifier(&css_power_notifier); > - if (ret) { > - unregister_reboot_notifier(&css_reboot_notifier); > - goto out_unregister; > - } > + if (ret) > + goto out_unregister_rn; > + ret = cio_dma_pool_init(); > + if (ret) > + goto out_unregister_rn; Don't you also need to unregister the pm notifier on failure here? Other than that, I noticed only...
2019 Jun 03
5
[PATCH v3 2/8] s390/cio: introduce DMA pools to cio
...sk; > > mutex_init(&css->mutex); > css->cssid = chsc_get_cssid(nr); (...) > @@ -1059,16 +1168,19 @@ static int __init css_bus_init(void) > if (ret) > goto out_unregister; > ret = register_pm_notifier(&css_power_notifier); > - if (ret) { > - unregister_reboot_notifier(&css_reboot_notifier); > - goto out_unregister; > - } > + if (ret) > + goto out_unregister_rn; > + ret = cio_dma_pool_init(); > + if (ret) > + goto out_unregister_rn; Don't you also need to unregister the pm notifier on failure here? Other than that, I noticed only...