From: Dave Airlie Date: Thu, 24 Jan 2008 05:18:09 +0000 (+1000) Subject: i915: fix missing header when copying data from userspace X-Git-Tag: submit/1.0/20121108.012404~1018^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b9930645227d52f47b6dc85cd1aee65bb5820ad;p=profile%2Fivi%2Flibdrm.git i915: fix missing header when copying data from userspace --- diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c index ed56308..287e95a 100644 --- a/shared-core/i915_dma.c +++ b/shared-core/i915_dma.c @@ -834,7 +834,7 @@ int i915_process_relocs(struct drm_file *file_priv, goto out; } - reloc_buf_size = reloc_count * I915_RELOC0_STRIDE * sizeof(uint32_t); + reloc_buf_size = (I915_RELOC_HEADER + (reloc_count * I915_RELOC0_STRIDE)) * sizeof(uint32_t); reloc_buf = kmalloc(reloc_buf_size, GFP_KERNEL); if (!reloc_buf) { DRM_ERROR("Out of memory for reloc buffer\n");