summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2012-06-01 15:48:04 +0200
committerDave Airlie <airlied@redhat.com>2012-06-01 17:00:20 +0100
commit0824db38e515644f8d1bfd64adbd7cb2c6ea7c62 (patch)
treec0db7ce9d06f2b221e04110335896f4ef36aac2c /drivers/gpu/drm/vmwgfx
parenta8ff3ee211fccf708e1911bbc096625453ebf759 (diff)
downloadop-kernel-dev-0824db38e515644f8d1bfd64adbd7cb2c6ea7c62.zip
op-kernel-dev-0824db38e515644f8d1bfd64adbd7cb2c6ea7c62.tar.gz
drm/vmwgfx: Fix nasty write past alloced memory area
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c b/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
index 51c9ba5..21ee782 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
@@ -66,7 +66,7 @@ static int vmw_gmr2_bind(struct vmw_private *dev_priv,
cmd += sizeof(remap_cmd) / sizeof(uint32);
for (i = 0; i < num_pages; ++i) {
- if (VMW_PPN_SIZE > 4)
+ if (VMW_PPN_SIZE <= 4)
*cmd = page_to_pfn(*pages++);
else
*((uint64_t *)cmd) = page_to_pfn(*pages++);
OpenPOWER on IntegriCloud