Skip to contentSkip to conversation

FAILED: patch "[PATCH] drm/vmwgfx: Fix kernel NULL pointer dereference on older" failed to apply to 4.2-stable tree

PATCH [email protected] 1 participant 1 message Oct 23, 2015

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.2-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

Quoted 1 line

From ed7d78b2da32198ca4c70172e3b63c6b3e2c570b Mon Sep 17 00:00:00 2001

From: Thomas Hellstrom <[email protected]>
Date: Mon, 12 Oct 2015 01:49:39 -0700
Subject: [PATCH] drm/vmwgfx: Fix kernel NULL pointer dereference on older
hardware

The commit "drm/vmwgfx: Fix up user_dmabuf refcounting", while fixing a kernel crash introduced a NULL pointer dereference on older hardware. Fix this.

drivers/gpu/drm/vmwgfx/vmwgfx_surface.c +2 -1
index 64b50409fa07..03f63c749c02 100644
@@ -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);
 }