diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2010-09-21 08:18:01 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2010-11-04 07:22:11 -0400 |
commit | dfe5ac5b18be5b10d01a17e734a9905c0def6088 (patch) | |
tree | c5dab52cb8c8aeb2a37546f8ff8ba340412901c7 /drivers | |
parent | 64e1c80748afca3b4818ebb232a9668bf529886d (diff) |
vhost: copy_to_user -> __copy_to_user
We do access_ok checks at setup time, so we don't need to
redo them on each access.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/vhost/vhost.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index c17c881e235a..e6a093187a0e 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c | |||
@@ -1258,7 +1258,7 @@ static int __vhost_add_used_n(struct vhost_virtqueue *vq, | |||
1258 | 1258 | ||
1259 | start = vq->last_used_idx % vq->num; | 1259 | start = vq->last_used_idx % vq->num; |
1260 | used = vq->used->ring + start; | 1260 | used = vq->used->ring + start; |
1261 | if (copy_to_user(used, heads, count * sizeof *used)) { | 1261 | if (__copy_to_user(used, heads, count * sizeof *used)) { |
1262 | vq_err(vq, "Failed to write used"); | 1262 | vq_err(vq, "Failed to write used"); |
1263 | return -EFAULT; | 1263 | return -EFAULT; |
1264 | } | 1264 | } |