Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0824db38 authored by Thomas Hellstrom's avatar Thomas Hellstrom Committed by Dave Airlie
Browse files

drm/vmwgfx: Fix nasty write past alloced memory area



Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: default avatarJakob Bornecrantz <jakob@vmware.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent a8ff3ee2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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++);