summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-10-16 08:10:21 +1000
committerDave Airlie <airlied@redhat.com>2015-10-16 08:10:21 +1000
commitb2293cb5c6356e31a1c3275b0f84919d592902c9 (patch)
treeed7ee43e48b1835a7545d45815c48b84c520cdfc /drivers
parentae491542cbbbcca0ec8938c37d4079a985e58440 (diff)
parented7d78b2da32198ca4c70172e3b63c6b3e2c570b (diff)
Merge tag 'vmwgfx-fixes-4.3-151014' of git://people.freedesktop.org/~thomash/linux into drm-fixes
Pull request of 2015-10-14 * tag 'vmwgfx-fixes-4.3-151014' of git://people.freedesktop.org/~thomash/linux: drm/vmwgfx: Fix kernel NULL pointer dereference on older hardware
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_surface.c3
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);
}