Skip to content

Commit

Permalink
drm/vmwgfx: Fix nasty write past alloced memory area
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Hellstrom authored and Dave Airlie committed Jun 1, 2012
1 parent a8ff3ee commit 0824db3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++);
Expand Down

0 comments on commit 0824db3

Please sign in to comment.