diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2015-10-12 01:49:39 -0700 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2015-10-13 00:16:48 -0700 |
commit | ed7d78b2da32198ca4c70172e3b63c6b3e2c570b (patch) | |
tree | 41178e69ad96f4c93605e3cdff381091f0b9937e | |
parent | 575f9c8604e0b4c7b36fb41fc5fd280a3c336906 (diff) |
drm/vmwgfx: Fix kernel NULL pointer dereference on older hardwarevmwgfx-fixes-4.3-151014
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: <stable@vger.kernel.org>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c index 64b50409fa07..03f63c749c02 100644 --- 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); } |