diff options
| author | fred gao <[email protected]> | 2017-08-16 07:48:03 +0000 |
|---|---|---|
| committer | Zhenyu Wang <[email protected]> | 2017-08-23 06:08:57 +0000 |
| commit | ffeaf9aaf97b4bdaf114d6df52f800d71918768c (patch) | |
| tree | 346dde7bc87ad691ac5b2a438b91a82fe3ad42e4 /drivers/gpu/drm/i915/gvt/cmd_parser.c | |
| parent | drm/i915/gvt: Change the max length of mmio_reg_rw from 4 to 8 (diff) | |
| download | kernel-ffeaf9aaf97b4bdaf114d6df52f800d71918768c.tar.gz kernel-ffeaf9aaf97b4bdaf114d6df52f800d71918768c.zip | |
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")
Cc: [email protected] # v4.8+
Signed-off-by: fred gao <[email protected]>
Signed-off-by: Zhenyu Wang <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/cmd_parser.c')
| -rw-r--r-- | drivers/gpu/drm/i915/gvt/cmd_parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c index 713848c36349..e556a46cd4c2 100644 --- a/drivers/gpu/drm/i915/gvt/cmd_parser.c +++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c @@ -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; } |
