From: Michael S. Tsirkin Date: Tue, 21 Sep 2010 12:18:01 +0000 (+0200) Subject: vhost: copy_to_user -> __copy_to_user X-Git-Tag: v3.0~2504^2~168^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dfe5ac5b18be5b10d01a17e734a9905c0def6088;p=platform%2Fkernel%2Flinux-amlogic.git 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 --- diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index c17c881..e6a0931 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, 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; }