Skip to content

Commit

Permalink
vhost: copy_to_user -> __copy_to_user
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mstsirkin committed Nov 4, 2010
1 parent 64e1c80 commit dfe5ac5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/vhost/vhost.c
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ static int __vhost_add_used_n(struct vhost_virtqueue *vq,

start = vq->last_used_idx % vq->num;
used = vq->used->ring + start;
if (copy_to_user(used, heads, count * sizeof *used)) {
if (__copy_to_user(used, heads, count * sizeof *used)) {
vq_err(vq, "Failed to write used");
return -EFAULT;
}
Expand Down

0 comments on commit dfe5ac5

Please sign in to comment.