[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] Don't register shutdown watch and suspend event channel for Dom0



# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1289907124 0
# Node ID c72ead7ec5953e8bb702b4b025296e8de8321195
# Parent  7de7453dee36455d418f8bb8092a329c662b126a
Don't register shutdown watch and suspend event channel for Dom0

This pointlessly consumes resources and poses the risk of either
getting triggered inadvertently.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 drivers/xen/core/reboot.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff -r 7de7453dee36 -r c72ead7ec595 drivers/xen/core/reboot.c
--- a/drivers/xen/core/reboot.c Tue Nov 16 11:31:19 2010 +0000
+++ b/drivers/xen/core/reboot.c Tue Nov 16 11:32:04 2010 +0000
@@ -277,6 +277,15 @@ static int setup_shutdown_watcher(void)
 {
        int err;
 
+       err = register_xenbus_watch(&sysrq_watch);
+       if (err) {
+               printk(KERN_ERR "Failed to set sysrq watcher\n");
+               return err;
+       }
+
+       if (is_initial_xendomain())
+               return 0;
+
        xenbus_scanf(XBT_NIL, "control",
                     "platform-feature-multiprocessor-suspend",
                     "%d", &fast_suspend);
@@ -284,12 +293,6 @@ static int setup_shutdown_watcher(void)
        err = register_xenbus_watch(&shutdown_watch);
        if (err) {
                printk(KERN_ERR "Failed to set shutdown watcher\n");
-               return err;
-       }
-
-       err = register_xenbus_watch(&sysrq_watch);
-       if (err) {
-               printk(KERN_ERR "Failed to set sysrq watcher\n");
                return err;
        }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.