From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: [patch] Add missing breaks to {set, get}_address_size domctls. Date: Wed, 14 Feb 2007 16:25:06 +0100 Message-ID: <45D329D2.4080402@suse.de> References: <45D300DA.9050708@suse.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060303010409040401070501" Return-path: In-Reply-To: <45D300DA.9050708@suse.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen devel list Cc: Jan Beulich List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------060303010409040401070501 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Gerd Hoffmann wrote: > Hi, > > $subject says all ;) Oops, fix was incomplete, the get_address_size also lacks the copy_to_guest() ... updated patch attached, Gerd -- Gerd Hoffmann --------------060303010409040401070501 Content-Type: text/x-patch; name="domctl.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="domctl.diff" diff -r ad9bbd103034 xen/arch/x86/domctl.c --- a/xen/arch/x86/domctl.c Fri Feb 09 18:19:24 2007 +0000 +++ b/xen/arch/x86/domctl.c Wed Feb 14 15:42:34 2007 +0100 @@ -398,6 +398,7 @@ long arch_do_domctl( put_domain(d); } + break; case XEN_DOMCTL_get_address_size: { @@ -407,11 +408,16 @@ long arch_do_domctl( if ( (d = get_domain_by_id(domctl->domain)) == NULL ) break; + printk("%s: offset %zd\n", __FUNCTION__, offsetof(struct xen_domctl, u.address_size.size)); domctl->u.address_size.size = BITS_PER_GUEST_LONG(d); ret = 0; put_domain(d); - } + + if (copy_to_guest(u_domctl, domctl, 1)) + ret = -EFAULT; + } + break; default: ret = -ENOSYS; --------------060303010409040401070501 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------060303010409040401070501--