]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/vmwgfx: Return the correct value in vmw_translate_ptr functions
authorIan Forbes <ian.forbes@broadcom.com>
Tue, 13 Jan 2026 17:53:57 +0000 (11:53 -0600)
committerZack Rusin <zack.rusin@broadcom.com>
Thu, 5 Feb 2026 17:44:23 +0000 (12:44 -0500)
commit5023ca80f9589295cb60735016e39fc5cc714243
treed468640eebc4577ca8bb5d6be30361d6e88c30e6
parent922f9dec5d19df4cfbb7070275e5c131d10c80f3
drm/vmwgfx: Return the correct value in vmw_translate_ptr functions

Before the referenced fixes these functions used a lookup function that
returned a pointer. This was changed to another lookup function that
returned an error code with the pointer becoming an out parameter.

The error path when the lookup failed was not changed to reflect this
change and the code continued to return the PTR_ERR of the now
uninitialized pointer. This could cause the vmw_translate_ptr functions
to return success when they actually failed causing further uninitialized
and OOB accesses.

Reported-by: Kuzey Arda Bulut <kuzeyardabulut@gmail.com>
Fixes: a309c7194e8a ("drm/vmwgfx: Remove rcu locks from user resources")
Signed-off-by: Ian Forbes <ian.forbes@broadcom.com>
Reviewed-by: Zack Rusin <zack.rusin@broadcom.com>
Signed-off-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patch.msgid.link/20260113175357.129285-1-ian.forbes@broadcom.com
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c