Fix pointer tests in error-handling paths
Subsystems (2)
PATCH 1/1 Fix pointer tests in error-handling paths
From: Dave Gordon <[email protected]>
In the error-handling paths of i915_gem_do_execbuffer() and intel_crtc_page_flip(), the local pointer-to-request variables were expected to be either valid pointers or NULL. Since
2682708 drm/i915: simplify allocation of driver-internal requests
they could also be ERR_PTR() values, so the tests need to be updated to accommodate this case.
--- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_gem_execbuffer.c +1 -1
@@ -1655,7 +1655,7 @@ err:* must be freed again. If it was submitted then it is being tracked * on the active request list and no clean up is required here. */ -if (ret && req) +if (ret && !IS_ERR_OR_NULL (req))i915_gem_request_cancel (req);mutex_unlock (&dev->struct_mutex);
drivers/gpu/drm/i915/intel_display.c +1 -1
@@ -11726,7 +11726,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, cleanup_unpin:intel_unpin_fb_obj (fb, crtc->primary->state); cleanup_pending: -if (request) +if (!IS_ERR_OR_NULL (request))i915_gem_request_cancel (request);atomic_dec (&intel_crtc->unpin_work_count);mutex_unlock (&dev->struct_mutex);
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 16 lines · Tvrtko Ursulin
From: Dave Gordon <[email protected]>
In the error-handling paths of
i915_gem_do_execbuffer()andintel_crtc_page_flip(), the local pointer-to-request variables were expected to be either valid pointers or NULL. Since2682708 drm/i915: simplify allocation of driver-internal requests
they could also be
ERR_PTR()values, so the tests need to be updated to accommodate this case.Signed-off-by Dave Gordon <[email protected]>Cc Tvrtko Ursulin <[email protected]>Reviewed-by Tvrtko Ursulin <[email protected]>Signed-off-by Dave Gordon <[email protected]>Reviewed-by Tvrtko Ursulin <[email protected]>
Quoted 4 lines
--- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Re-sent for CI since we need this fix in ASAP.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for Fix pointer tests in error-handling paths
In reply to Tvrtko Ursulin== Summary ==
== Summary ==
Series 2897v1 Fix pointer tests in error-handling paths
http://patchwork.freedesktop.org/api/1.0/series/2897/revisions/1/mbox/
bdw-ultra total:159 pass:153 dwarn:0 dfail:0 fail:0 skip:6 bsw-nuc-2 total:159 pass:135 dwarn:0 dfail:0 fail:0 skip:24 byt-nuc total:159 pass:142 dwarn:0 dfail:0 fail:0 skip:17 hsw-brixbox total:159 pass:152 dwarn:0 dfail:0 fail:0 skip:7 hsw-gt2 total:159 pass:155 dwarn:0 dfail:0 fail:0 skip:4 ilk-hp8440p total:159 pass:114 dwarn:0 dfail:0 fail:1 skip:44 ivb-t430s total:159 pass:151 dwarn:0 dfail:0 fail:0 skip:8 skl-i5k-2 total:159 pass:150 dwarn:1 dfail:0 fail:0 skip:8 snb-dellxps total:159 pass:141 dwarn:0 dfail:0 fail:0 skip:18 snb-x220t total:159 pass:141 dwarn:0 dfail:0 fail:1 skip:17
Results at /archive/results/CI_IGT_test/Patchwork_1310/
b3f8ad64bc71f6236f05c2e9f4ad49a61745869a drm-intel-nightly: 2016y-01m-28d-10h-26m-23s UTC integration manifest 17a070b9575bfb61ec47bba7fef32a5e3375bf7d Fix pointer tests in error-handling paths
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx