drm/tegra: Use correct relocation target offsets
authorDavid Ung <davidu@nvidia.com>
Wed, 21 Jan 2015 02:37:35 +0000 (18:37 -0800)
committerThierry Reding <treding@nvidia.com>
Tue, 27 Jan 2015 09:14:59 +0000 (10:14 +0100)
When copying a relocation from userspace, copy the correct target
offset.

Signed-off-by: David Ung <davidu@nvidia.com>
Fixes: 961e3beae3b2 ("drm/tegra: Make job submission 64-bit safe")
Cc: stable@vger.kernel.org
[treding@nvidia.com: provide a better commit message]
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/drm.c

index 5bccb20889f74fb4a70c3ca0d390d4a58b9ae4d1..7dd328d77996f77101d77e43f41049c66202bfcd 100644 (file)
@@ -293,7 +293,7 @@ static int host1x_reloc_copy_from_user(struct host1x_reloc *dest,
        if (err < 0)
                return err;
 
-       err = get_user(dest->target.offset, &src->cmdbuf.offset);
+       err = get_user(dest->target.offset, &src->target.offset);
        if (err < 0)
                return err;