Skip to contentSkip to conversation

Add missing breaks to {set, get}_address_size domctls.

PATCH In review Gerd Hoffmann 3 participants 5 messages Feb 14, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add missing breaks to {set, get}_address_size domctls.

Hi,

$subject says all ;)

please apply,
Gerd

Signature · 1 line
Gerd Hoffmann <[email protected]>

Add missing breaks to {set,get}_address_size domctls.

xen/arch/x86/domctl.c +2 -0
diff -r ad9bbd103034 xen/arch/x86/domctl.c
@@ -398,6 +398,7 @@ long arch_do_domctl(
 
         put_domain(d);
     }
+    break;
 
     case XEN_DOMCTL_get_address_size:
     {
@@ -412,6 +413,7 @@ long arch_do_domctl(
         ret = 0;
         put_domain(d);
     }
+    break;
 
     default:
         ret = -ENOSYS;

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 3 lines · Gerd Hoffmann

Hi,

$subject says all ;)

Oops, fix was incomplete, the get_address_size also lacks the copy_to_guest() ...

updated patch attached,
Gerd

Signature · 1 line
Gerd Hoffmann <[email protected]>
xen/arch/x86/domctl.c +7 -1
diff -r ad9bbd103034 xen/arch/x86/domctl.c
@@ -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;

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw
Quoted 8 lines
Quoted 1 line
Quoted 1 line

Gerd Hoffmann <[email protected]> 14.02.07 16:25 >>>

Quoted 3 lines · Gerd Hoffmann

Hi,

$subject says all ;)

Oops, fix was incomplete, the get_address_size also lacks the copy_to_guest() ...

But the added printk in there is certainly a leftover...

Jan

#3 lore raw
Quoted 6 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line

$subject says all ;)

Oops, fix was incomplete, the get_address_size also lacks the copy_to_guest() ...

But the added printk in there is certainly a leftover...

It's cleaned up and checked in now.

K.

#4 lore raw
In reply to Jan Beulich
Quoted 9 lines · Jan Beulich
Quoted 7 lines
Quoted 1 line
Quoted 1 line

Gerd Hoffmann <[email protected]> 14.02.07 16:25 >>>

Quoted 3 lines · Gerd Hoffmann

Hi,

$subject says all ;)

Oops, fix was incomplete, the get_address_size also lacks the copy_to_guest() ...

But the added printk in there is certainly a leftover...

Yep, forgot to delete that one and -- as usual -- noticed that a few seconds after sending off the mail ...

cheers,
Gerd

Signature · 1 line
Gerd Hoffmann <[email protected]>