]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915: Fix typo from e5281ccd in i915_gem_attach_phys_object()
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 30 Oct 2010 21:52:31 +0000 (22:52 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 30 Oct 2010 21:52:31 +0000 (22:52 +0100)
Accessing the uninitialised obj->pages instead of the local page lead to
an OOPs.

Reported-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_gem.c

index 936ddd83f8a2ed22f5d1654399ec4f3fc5b33b13..e3fc333e2e57c04ed6d00c646d218646273824d9 100644 (file)
@@ -4925,7 +4925,7 @@ i915_gem_attach_phys_object(struct drm_device *dev,
                if (IS_ERR(page))
                        return PTR_ERR(page);
 
-               src = kmap_atomic(obj_priv->pages[i]);
+               src = kmap_atomic(page);
                dst = obj_priv->phys_obj->handle->vaddr + (i * PAGE_SIZE);
                memcpy(dst, src, PAGE_SIZE);
                kunmap_atomic(src);