projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
575f9c8
)
drm/vmwgfx: Fix kernel NULL pointer dereference on older hardware
author
Thomas Hellstrom
<
[email protected]
>
Mon, 12 Oct 2015 08:49:39 +0000
(
01:49
-0700)
committer
Thomas Hellstrom
<
[email protected]
>
Tue, 13 Oct 2015 07:16:48 +0000
(
00:16
-0700)
The commit "drm/vmwgfx: Fix up user_dmabuf refcounting", while fixing a
kernel crash introduced a NULL pointer dereference on older hardware.
Fix this.
Cc: <
[email protected]
>
Signed-off-by: Thomas Hellstrom <
[email protected]
>
Reviewed-by: Sinclair Yeh <
[email protected]
>
Reviewed-by: Brian Paul <
[email protected]
>
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
index 64b50409fa0749558844cf561aac983e36197241..03f63c749c02333f412c82184f20def8ce1d8d74 100644
(file)
--- a/
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
+++ b/
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
@@
-657,7
+657,8
@@
static void vmw_user_surface_base_release(struct ttm_base_object **p_base)
struct vmw_resource *res = &user_srf->srf.res;
*p_base = NULL;
- ttm_base_object_unref(&user_srf->backup_base);
+ if (user_srf->backup_base)
+ ttm_base_object_unref(&user_srf->backup_base);
vmw_resource_unreference(&res);
}