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

[Xen-devel] [PATCH] Fix user direct access in grant_table.c



From: Rusty Russell <rusty@xxxxxxxxxxxxxxx>

Tony found a direct userspace access with his unit test for
grant_table.c.  We access "uop->frame_list" (a pointer) directly, rather
than using "op.frame_list".

Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Signed-off-by: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>


diff -r aebe8f5c7069 xen/common/grant_table.c
--- a/xen/common/grant_table.c  Mon Dec 12 18:45:53 2005
+++ b/xen/common/grant_table.c  Tue Dec 13 15:23:23 2005
@@ -579,7 +579,7 @@
         (void)put_user(GNTST_okay, &uop->status);
         for ( i = 0; i < op.nr_frames; i++ )
             (void)put_user(gnttab_shared_mfn(d, d->grant_table, i),
-                           &uop->frame_list[i]);
+                           &op.frame_list[i]);
     }
 
     put_domain(d);

Yours Tony

   linux.conf.au       http://linux.conf.au/ || http://lca2006.linux.org.au/
   Jan 23-28 2006      The Australian Linux Technical Conference!


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


 


Rackspace

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