size is kept in pages, validate_range gets bytes. Signed-off-by: Uri Lublin <uril@xxxxxxxxxx> Signed-off-by: Snir Sheriber <ssheribe@xxxxxxxxxx> --- drivers/gpu/drm/i915/gvt/dmabuf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gvt/dmabuf.c b/drivers/gpu/drm/i915/gvt/dmabuf.c index 69a9a1b2ea4a..857e3a02d951 100644 --- a/drivers/gpu/drm/i915/gvt/dmabuf.c +++ b/drivers/gpu/drm/i915/gvt/dmabuf.c @@ -284,7 +284,8 @@ static int vgpu_get_plane_info(struct drm_device *dev, return -EFAULT; } - if (!intel_gvt_ggtt_validate_range(vgpu, info->start, info->size)) { + if (!intel_gvt_ggtt_validate_range(vgpu, info->start, + info->size << PAGE_SHIFT)) { gvt_vgpu_err("invalid gma addr\n"); return -EFAULT; } -- 2.20.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx