Skip to contentSkip to conversation

drm/i915: avoid dereferencing NULL pointer when failing to pin global ctx

PATCH New Zhi Wang 2 participants 2 messages Feb 17, 2016

Subsystems (2)
lore
Share & tools
lore

Zhi Wang

author
#0 lore raw

PATCH 1/1 drm/i915: avoid dereferencing NULL pointer when failing to pin global ctx

Avoid derefenceing the NULL pointer when failing to pin the global engine context.

---
 drivers/gpu/drm/i915/i915_gem_context.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_context.c +2 -1
index 4be2ce9..43d4019 100644
@@ -316,7 +316,8 @@ err_unpin:
 	if (is_global_default_ctx && ctx->legacy_hw_ctx.rcs_state)
 		i915_gem_object_ggtt_unpin(ctx->legacy_hw_ctx.rcs_state);
 err_destroy:
-	idr_remove(&file_priv->context_idr, ctx->user_handle);
+	if (file_priv)
+		idr_remove(&file_priv->context_idr, ctx->user_handle);
 	i915_gem_context_unreference(ctx);
 	return ERR_PTR(ret);
 }
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✗ Fi.CI.BAT: failure for drm/i915: avoid dereferencing NULL pointer when failing to pin global ctx

== Summary ==

== Summary ==

Series 3513v1 drm/i915: avoid dereferencing NULL pointer when failing to pin global ctx
http://patchwork.freedesktop.org/api/1.0/series/3513/revisions/1/mbox/

Test gem_ringfill:

        Subgroup basic-default-hang:
                incomplete -> PASS       (snb-dellxps)
Test gem_sync:
        Subgroup basic-bsd:
                pass       -> DMESG-FAIL (hsw-brixbox)
Test kms_flip:
        Subgroup basic-flip-vs-dpms:
                pass       -> DMESG-WARN (ilk-hp8440p) UNSTABLE
        Subgroup basic-flip-vs-modeset:
                pass       -> DMESG-WARN (ilk-hp8440p) UNSTABLE
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-a:
                dmesg-warn -> PASS       (skl-i5k-2)
        Subgroup suspend-read-crc-pipe-b:
                pass       -> DMESG-WARN (skl-i5k-2)
        Subgroup suspend-read-crc-pipe-c:
                dmesg-warn -> PASS       (bsw-nuc-2)
Test pm_rpm:
        Subgroup basic-pci-d3-state:
                fail       -> PASS       (bdw-nuci7)
                dmesg-warn -> PASS       (byt-nuc)
        Subgroup basic-rte:
                pass       -> DMESG-WARN (byt-nuc) UNSTABLE
bdw-nuci7        total:162  pass:152  dwarn:0   dfail:0   fail:0   skip:10 
bdw-ultra        total:165  pass:152  dwarn:0   dfail:0   fail:0   skip:13 
bsw-nuc-2        total:165  pass:135  dwarn:1   dfail:0   fail:0   skip:29 
byt-nuc          total:165  pass:140  dwarn:1   dfail:0   fail:0   skip:24 
hsw-brixbox      total:165  pass:150  dwarn:0   dfail:1   fail:0   skip:14 
ilk-hp8440p      total:165  pass:114  dwarn:2   dfail:0   fail:1   skip:48 
skl-i5k-2        total:165  pass:149  dwarn:1   dfail:0   fail:0   skip:15 
snb-dellxps      total:165  pass:142  dwarn:0   dfail:0   fail:1   skip:22 
snb-x220t        total:165  pass:142  dwarn:0   dfail:0   fail:2   skip:21 

Results at /archive/results/CI_IGT_test/Patchwork_1420/

bd0b1a9aa8b7fdb2e06a5cbf1756ef93de2fa3fd drm-intel-nightly: 2016y-02m-16d-17h-53m-05s UTC integration manifest 095716fa2028d4894855925d6b7fe4f8dc7d9c5e drm/i915: avoid dereferencing NULL pointer when failing to pin global ctx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx