WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH]: xl: catch invalid numeric domain ID

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH]: xl: catch invalid numeric domain ID
From: Andre Przywara <andre.przywara@xxxxxxx>
Date: Fri, 21 Jan 2011 17:16:02 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 21 Jan 2011 08:16:15 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.14) Gecko/20101020 Thunderbird/3.0.9
Hi,

if you run any domain specific xl command with an invalid (aka non-existing) numeric domain ID, the command does not abort, but proceeds with some bogus number:
# xl destroy 42
libxl: error: libxl.c:692:libxl_domain_destroy xc_domain_pause failed for 42
libxl: error: libxl_dm.c:705:libxl__destroy_device_model Couldn't find device model's pid: No such file or directory libxl: error: libxl.c:696:libxl_domain_destroy libxl__destroy_device_model failed for 42 libxl: error: libxl_device.c:325:libxl__devices_destroy /local/domain/42/device is empty libxl: error: libxl_dom.c:536:userdata_path unable to find domain info for domain 42: Success libxl: error: libxl.c:713:libxl_domain_destroy xc_domain_destroy failed for 42

The attached patch catches a non-existing domain and returns early (as an invalid domain _name_ would do).
Please apply to Xen 4.1.0-rc.

Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx>

--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany

Attachment: xl_fix_invalid_numeric_id.patch
Description: xl_fix_invalid_numeric_id.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>