Message ID | 20141215112932.GA27136@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index ed71b53..4c83be8 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -1047,9 +1047,7 @@ int vhost_init_used(struct vhost_virtqueue *vq) if (r) return r; vq->signalled_used_valid = false; - if (!access_ok(VERIFY_READ, &vq->used->idx, sizeof vq->used->idx)) - return -EFAULT; - r = __get_user(last_used_idx, &vq->used->idx); + r = get_user(last_used_idx, &vq->used->idx); if (r) return r; vq->last_used_idx = vhost16_to_cpu(vq, last_used_idx);