Skip to contentSkip to conversation

FAILED: patch "[PATCH] drm/i915/gvt: Fix the kernel null pointer error" failed to apply to 4.9-stable tree

PATCH [email protected] 1 participant 1 message Aug 27, 2017

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.9-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 ffeaf9aaf97b4bdaf114d6df52f800d71918768c Mon Sep 17 00:00:00 2001

From: fred gao <[email protected]>
Date: Wed, 16 Aug 2017 15:48:03 +0800
Subject: [PATCH] drm/i915/gvt: Fix the kernel null pointer error

once error happens in shadow_indirect_ctx function, the variable wa_ctx->indirect_ctx.obj is not initialized but accessed, so the kernel null point panic occurs.

Fixes 894cf7d15634 ("drm/i915/gvt: i915_gem_object_create() returns an error pointer")
drivers/gpu/drm/i915/gvt/cmd_parser.c +1 -1
index 713848c36349..e556a46cd4c2 100644
@@ -2714,7 +2714,7 @@ static int shadow_indirect_ctx(struct intel_shadow_wa_ctx *wa_ctx)
 unmap_src:
 	i915_gem_object_unpin_map(obj);
 put_obj:
-	i915_gem_object_put(wa_ctx->indirect_ctx.obj);
+	i915_gem_object_put(obj);
 	return ret;
 }