aboutsummaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-01-24 15:18:09 +1000
committerDave Airlie <airlied@redhat.com>2008-01-24 15:18:09 +1000
commit5b9930645227d52f47b6dc85cd1aee65bb5820ad (patch)
tree7aef96b1a504d9c5a84737d67b0176d7643ce4b1 /shared-core
parent34b71eb45124b32377b82b4d3737537b9195b0a7 (diff)
i915: fix missing header when copying data from userspace
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/i915_dma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c
index ed563086..287e95ac 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");