]> git.baikalelectronics.ru Git - kernel.git/commit
vhost: Fix vhost_copy_to_user()
authorEric Auger <eric.auger@redhat.com>
Wed, 11 Apr 2018 13:30:38 +0000 (15:30 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Apr 2018 14:52:34 +0000 (10:52 -0400)
commit7182a85c0792f0a434e209924eac28ff22644617
tree83c1da2c76b6b049915063144677b9b77a9ba122
parentb2076bd455d53fac5b4886455e2a4e734d7985cd
vhost: Fix vhost_copy_to_user()

vhost_copy_to_user is used to copy vring used elements to userspace.
We should use VHOST_ADDR_USED instead of VHOST_ADDR_DESC.

Fixes: 37a65db62452 ("vhost: introduce O(1) vq metadata cache")
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/vhost/vhost.c