]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/vhost/vsock.c
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[mirror_ubuntu-jammy-kernel.git] / drivers / vhost / vsock.c
index 0898dbdbf955faa4c274c35fab33c0ef4da5bf92..34bc3ab40c6da8d5637e6e5bd19e6fb27ec27fba 100644 (file)
@@ -699,12 +699,23 @@ static long vhost_vsock_dev_ioctl(struct file *f, unsigned int ioctl,
        }
 }
 
+#ifdef CONFIG_COMPAT
+static long vhost_vsock_dev_compat_ioctl(struct file *f, unsigned int ioctl,
+                                        unsigned long arg)
+{
+       return vhost_vsock_dev_ioctl(f, ioctl, (unsigned long)compat_ptr(arg));
+}
+#endif
+
 static const struct file_operations vhost_vsock_fops = {
        .owner          = THIS_MODULE,
        .open           = vhost_vsock_dev_open,
        .release        = vhost_vsock_dev_release,
        .llseek         = noop_llseek,
        .unlocked_ioctl = vhost_vsock_dev_ioctl,
+#ifdef CONFIG_COMPAT
+       .compat_ioctl   = vhost_vsock_dev_compat_ioctl,
+#endif
 };
 
 static struct miscdevice vhost_vsock_misc = {