vhost: fix VHOST_GET_BACKEND_FEATURES ioctl request definition
authorGleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
Mon, 3 Sep 2018 17:59:13 +0000 (20:59 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Sep 2018 04:23:24 +0000 (21:23 -0700)
The _IOC_READ flag fits this ioctl request more because this request
actually only writes to, but doesn't read from userspace.
See NOTEs in include/uapi/asm-generic/ioctl.h for more information.

Fixes: 429711aec282 ("vhost: switch to use new message format")
Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/vhost.h

index b1e22c40c4b68a0b39d0a8a567baea1f3b5403ed..84c3de89696a15c1a23e7226dea456a6232e2043 100644 (file)
@@ -176,7 +176,7 @@ struct vhost_memory {
 #define VHOST_BACKEND_F_IOTLB_MSG_V2 0x1
 
 #define VHOST_SET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x25, __u64)
-#define VHOST_GET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x26, __u64)
+#define VHOST_GET_BACKEND_FEATURES _IOR(VHOST_VIRTIO, 0x26, __u64)
 
 /* VHOST_NET specific defines */