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

[Xen-changelog] [xen-unstable] Return -EINVAL when trying to kick/kill a nonexistent domain watchdog



# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1318612084 -3600
# Node ID 7cfd5bb3b9f9399e0ec026cf23371169c1c85606
# Parent  f63528cc50601b730a3283059fbb7e7896f97674
Return -EINVAL when trying to kick/kill a nonexistent domain watchdog

... to be more in-line with the NR_DOMAIN_WATCHDOG_TIMERS check at the
top of domain_watchdog(), and also to follow the
timer_(delete|settime)
POSIX API's EINVAL return value.

Signed-off-by: Laszlo Ersek <lersek@xxxxxxxxxx>

Also, replace EEXIST with ENOSPC when failing to allocate a new
domain watchdog.

Signed-off-by: Keir Fraser <keir@xxxxxxx>

Committed-by: Keir Fraser <keir@xxxxxxx>
---


diff -r f63528cc5060 -r 7cfd5bb3b9f9 xen/common/schedule.c
--- a/xen/common/schedule.c     Fri Oct 14 14:34:15 2011 +0200
+++ b/xen/common/schedule.c     Fri Oct 14 18:08:04 2011 +0100
@@ -754,14 +754,14 @@
             break;
         }
         spin_unlock(&d->watchdog_lock);
-        return id == NR_DOMAIN_WATCHDOG_TIMERS ? -EEXIST : id + 1;
+        return id == NR_DOMAIN_WATCHDOG_TIMERS ? -ENOSPC : id + 1;
     }
 
     id -= 1;
     if ( !test_bit(id, &d->watchdog_inuse_map) )
     {
         spin_unlock(&d->watchdog_lock);
-        return -EEXIST;
+        return -EINVAL;
     }
 
     if ( timeout == 0 )

_______________________________________________
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®.