提交 dfe5ac5b 编写于 作者: M Michael S. Tsirkin

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: NMichael S. Tsirkin <mst@redhat.com>
上级 64e1c807
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册