Commit fd3a964b authored by Thomas Hellstrom's avatar Thomas Hellstrom Committed by Luis Henriques

drm/vmwgfx: Fix kernel NULL pointer dereference on older hardware

commit ed7d78b2 upstream.

The commit "drm/vmwgfx: Fix up user_dmabuf refcounting", while fixing a
kernel crash introduced a NULL pointer dereference on older hardware.
Fix this.
Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: default avatarSinclair Yeh <syeh@vmware.com>
Reviewed-by: default avatarBrian Paul <brianp@vmware.com>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 2efdc7e5
......@@ -653,6 +653,7 @@ static void vmw_user_surface_base_release(struct ttm_base_object **p_base)
struct vmw_resource *res = &user_srf->srf.res;
*p_base = NULL;
if (user_srf->backup_base)
ttm_base_object_unref(&user_srf->backup_base);
vmw_resource_unreference(&res);
}
......
Markdown is supported
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