diff mbox

fix vhost ioctl handling for 32-bit

Message ID OF2C13AA5B.035759E8-ON8825768F.006B935D-8825768F.006C7C27@us.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

David Stevens Dec. 17, 2009, 7:44 p.m. UTC
None
diff mbox

Patch

--- a/drivers/vhost/net.c       2009-11-17 22:51:56.000000000 -0800
+++ b/drivers/vhost/net.c       2009-12-17 11:31:51.000000000 -0800
@@ -563,7 +563,7 @@ 
 {
        struct vhost_net *n = f->private_data;
        void __user *argp = (void __user *)arg;
-       u32 __user *featurep = argp;
+       u64 __user *featurep = (u64 __user *)argp;
        struct vhost_vring_file backend;
        u64 features;
        int r;
@@ -577,7 +577,7 @@ 
                features = VHOST_FEATURES;
                return put_user(features, featurep);
        case VHOST_SET_FEATURES:
-               r = get_user(features, featurep);
+               r = copy_from_user(&features, featurep, sizeof features);
                /* No features for now */
                if (r < 0)
                        return r;