Skip to content
Commit 6969e450 authored by Zack Rusin's avatar Zack Rusin Committed by Greg Kroah-Hartman
Browse files

drm/vmwgfx: Fix possible invalid drm gem put calls

commit f9e96bf1

 upstream.

vmw_bo_unreference sets the input buffer to null on exit, resulting in
null ptr deref's on the subsequent drm gem put calls.

This went unnoticed because only very old userspace would be exercising
those paths but it wouldn't be hard to hit on old distros with brand
new kernels.

Introduce a new function that abstracts unrefing of user bo's to make
the code cleaner and more explicit.

Signed-off-by: default avatarZack Rusin <zackr@vmware.com>
Reported-by: default avatarIan Forbes <iforbes@vmware.com>
Fixes: 9ef8d83e

 ("drm/vmwgfx: Do not drop the reference to the handle too soon")
Cc: <stable@vger.kernel.org> # v6.4+
Reviewed-by: default avatarMaaz <Mombasawala&lt;mombasawalam@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230818041301.407636-1-zack@kde.org
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5574b0cb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment