drm/i915: Release ctx->syncobj on final put, not on ctx close
Subsystems (2)
PATCH 1/1 drm/i915: Release ctx->syncobj on final put, not on ctx close
gem context refcounting is another exercise in least locking design it seems, where most things get destroyed upon context closure (which can race with anything really). Only the actual memory allocation and the locks survive while holding a reference.
This tripped up Jason when reimplementing the single timeline feature in
commit 00dae4d3d35d4f526929633b76e00b0ab4d3970d
Author: Jason Ekstrand <[email protected]> Date: Thu Jul 8 10:48:12 2021 -0500
drm/i915: Implement SINGLE_TIMELINE with a syncobj (v4)
We could fix the bug by holding ctx->mutex, but it's cleaner to just make the context object actually invariant over its _entire_ lifetime.
--- drivers/gpu/drm/i915/gem/i915_gem_context.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_context.c +3 -3
@@ -940,6 +940,9 @@ void i915_gem_context_release(struct kref *ref)trace_i915_context_free (ctx);GEM_BUG_ON (!i915_gem_context_is_closed (ctx)); +if (ctx->syncobj) +drm_syncobj_put (ctx->syncobj); +mutex_destroy (&ctx->engines_mutex);mutex_destroy (&ctx->lut_mutex);
@@ -1159,9 +1162,6 @@ static void context_close(struct i915_gem_context *ctx)if (vm)i915_vm_close (vm); -if (ctx->syncobj) -drm_syncobj_put (ctx->syncobj); - ctx->file_priv =ERR_PTR (-EBADF );/*
Signature · 1 line
2.32.0
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Release ctx->syncobj on final put, not on ctx close
== Series Details ==
== Series Details ==
Series: drm/i915: Release ctx->syncobj on final put, not on ctx close
URL : https://patchwork.freedesktop.org/series/93470/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
d1dd9f17231e drm/i915: Release ctx->syncobj on final put, not on ctx close
-:17: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 00dae4d3d35d ("drm/i915: Implement SINGLE_TIMELINE with a syncobj (v4)")'
#17:
commit 00dae4d3d35d4f526929633b76e00b0ab4d3970d-:62: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address mismatch: 'From: Daniel Vetter <[email protected]>' != 'Signed-off-by: Daniel Vetter <[email protected]>'
total: 1 errors, 1 warnings, 0 checks, 18 lines checked
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Release ctx->syncobj on final put, not on ctx close
In reply to Daniel Vetter== Series Details ==
== Series Details ==
Series: drm/i915: Release ctx->syncobj on final put, not on ctx close
URL : https://patchwork.freedesktop.org/series/93470/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_10457 -> Patchwork_20784
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/index.html
Known issues
------------
Here are the changes found in Patchwork_20784 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@gt_heartbeat:
- fi-kbl-soraka: [PASS][1] -> [DMESG-FAIL][2] ([i915#2291] / [i915#541])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/fi-kbl-soraka/igt@i915_selftest@live@gt_heartbeat.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/fi-kbl-soraka/igt@i915_selftest@live@gt_heartbeat.html
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s3:
- fi-tgl-1115g4: [FAIL][3] ([i915#1888]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/fi-tgl-1115g4/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/fi-tgl-1115g4/igt@[email protected]
* igt@i915_selftest@live@hangcheck:
- fi-icl-u2: [DMESG-FAIL][5] -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/fi-icl-u2/igt@i915_selftest@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/fi-icl-u2/igt@i915_selftest@[email protected]
[i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
[i915#2291]: https://gitlab.freedesktop.org/drm/intel/issues/2291
[i915#541]: https://gitlab.freedesktop.org/drm/intel/issues/541
Participating hosts (37 -> 34)
------------------------------
Missing (3): fi-bdw-samus fi-bsw-cyan bat-jsl-1
Build changes
-------------
* Linux: CI_DRM_10457 -> Patchwork_20784
CI-20190529: 20190529
CI_DRM_10457: 7700f858b68060307b0a7d94377a5d8f64000e5d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6162: 2f32b9e0da5f1ac9529318dd5b836c8cf4d3c441 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_20784: d1dd9f17231e132d8ea8aeaeb7fffdf45380f3ee @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
d1dd9f17231e drm/i915: Release ctx->syncobj on final put, not on ctx close
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/index.html
Patchwork
CI[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Release ctx->syncobj on final put, not on ctx close
In reply to Daniel Vetter== Series Details ==
== Series Details ==
Series: drm/i915: Release ctx->syncobj on final put, not on ctx close
URL : https://patchwork.freedesktop.org/series/93470/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_10457_full -> Patchwork_20784_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_20784_full absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_20784_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_20784_full:
### IGT changes ###
#### Possible regressions ####
* igt@gem_ctx_shared@exec-single-timeline@vecs0:
- shard-apl: NOTRUN -> [DMESG-WARN][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-apl2/igt@gem_ctx_shared@[email protected]
* igt@gem_ctx_shared@q-in-order@bcs0:
- shard-apl: [PASS][2] -> [DMESG-WARN][3] +5 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-apl1/igt@gem_ctx_shared@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-apl8/igt@gem_ctx_shared@[email protected]
* igt@gem_ctx_shared@q-out-order@bcs0:
- shard-iclb: [PASS][4] -> [DMESG-WARN][5] +9 similar issues
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-iclb8/igt@gem_ctx_shared@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-iclb6/igt@gem_ctx_shared@[email protected]
* igt@gem_ctx_shared@q-smoketest-all:
- shard-glk: [PASS][6] -> [DMESG-WARN][7] +7 similar issues
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-glk9/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-glk1/igt@[email protected]
* igt@gem_ctx_shared@single-timeline:
- shard-skl: [PASS][8] -> [DMESG-WARN][9] +12 similar issues
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-skl8/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-skl4/igt@[email protected]
* igt@gem_exec_whisper@basic-queues-all:
- shard-tglb: [PASS][10] -> [DMESG-WARN][11] +9 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-tglb8/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-tglb8/igt@[email protected]
- shard-kbl: NOTRUN -> [DMESG-WARN][12] +1 similar issue
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-kbl1/igt@[email protected]
* igt@gem_exec_whisper@basic-queues-priority-all:
- shard-kbl: [PASS][13] -> [DMESG-WARN][14] +6 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-kbl3/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-kbl4/igt@[email protected]
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* igt@gem_ctx_shared@q-independent@bcs0:
- {shard-rkl}: [PASS][15] -> [DMESG-WARN][16] +7 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-rkl-2/igt@gem_ctx_shared@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-rkl-2/igt@gem_ctx_shared@[email protected]
* igt@gem_ctx_shared@q-smoketest@rcs0:
- {shard-rkl}: NOTRUN -> [DMESG-WARN][17] +1 similar issue
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-rkl-2/igt@gem_ctx_shared@[email protected]
Known issues
------------
Here are the changes found in Patchwork_20784_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_isolation@preservation-s3@bcs0:
- shard-kbl: [PASS][18] -> [DMESG-WARN][19] ([i915#180]) +2 similar issues
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-kbl1/igt@gem_ctx_isolation@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-kbl6/igt@gem_ctx_isolation@[email protected]
* igt@gem_ctx_persistence@smoketest:
- shard-snb: NOTRUN -> [SKIP][20] ([fdo#109271] / [i915#1099]) +1 similar issue
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-snb6/igt@[email protected]
* igt@gem_eio@unwedge-stress:
- shard-tglb: [PASS][21] -> [TIMEOUT][22] ([i915#2369] / [i915#3063] / [i915#3648])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-tglb2/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-tglb2/igt@[email protected]
- shard-snb: NOTRUN -> [FAIL][23] ([i915#3354])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-snb6/igt@[email protected]
* igt@gem_exec_fair@basic-none-rrul@rcs0:
- shard-glk: [PASS][24] -> [FAIL][25] ([i915#2842]) +1 similar issue
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-glk5/igt@gem_exec_fair@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-glk7/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-none@vecs0:
- shard-kbl: NOTRUN -> [FAIL][26] ([i915#2842]) +1 similar issue
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-kbl3/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-pace-solo@rcs0:
- shard-kbl: [PASS][27] -> [FAIL][28] ([i915#2842]) +2 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-kbl7/igt@gem_exec_fair@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-kbl7/igt@gem_exec_fair@[email protected]
* igt@gem_exec_whisper@basic-contexts-priority:
- shard-glk: [PASS][29] -> [DMESG-WARN][30] ([i915#118] / [i915#95])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-glk1/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-glk5/igt@[email protected]
* igt@gem_pread@exhaustion:
- shard-apl: NOTRUN -> [WARN][31] ([i915#2658])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-apl2/igt@[email protected]
* igt@i915_pm_dc@dc5-dpms:
- shard-kbl: NOTRUN -> [FAIL][32] ([i915#545])
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-kbl3/igt@[email protected]
* igt@i915_pm_dc@dc6-psr:
- shard-skl: NOTRUN -> [FAIL][33] ([i915#454])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-skl3/igt@[email protected]
* igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp:
- shard-apl: NOTRUN -> [SKIP][34] ([fdo#109271] / [i915#1937])
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-apl8/igt@i915_pm_lpsp@[email protected]
* igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-0-async-flip:
- shard-skl: NOTRUN -> [FAIL][35] ([i915#3722])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-skl8/igt@[email protected]
* igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180-hflip:
- shard-apl: NOTRUN -> [SKIP][36] ([fdo#109271] / [i915#3777]) +1 similar issue
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-apl2/igt@[email protected]
* igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180-hflip:
- shard-skl: NOTRUN -> [SKIP][37] ([fdo#109271] / [i915#3777]) +1 similar issue
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-skl3/igt@[email protected]
* igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-hflip:
- shard-kbl: NOTRUN -> [SKIP][38] ([fdo#109271] / [i915#3777])
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-kbl3/igt@[email protected]
* igt@kms_ccs@pipe-a-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc:
- shard-apl: NOTRUN -> [SKIP][39] ([fdo#109271] / [i915#3886]) +11 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-apl1/igt@kms_ccs@pipe-a-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc.html
* igt@kms_ccs@pipe-b-bad-pixel-format-y_tiled_gen12_rc_ccs_cc:
- shard-skl: NOTRUN -> [SKIP][40] ([fdo#109271] / [i915#3886]) +2 similar issues
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-skl8/igt@kms_ccs@pipe-b-bad-pixel-format-y_tiled_gen12_rc_ccs_cc.html
* igt@kms_ccs@pipe-c-crc-primary-rotation-180-y_tiled_gen12_mc_ccs:
- shard-kbl: NOTRUN -> [SKIP][41] ([fdo#109271] / [i915#3886]) +4 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-kbl6/igt@kms_ccs@pipe-c-crc-primary-rotation-180-y_tiled_gen12_mc_ccs.html
* igt@kms_color@pipe-d-ctm-max:
- shard-skl: NOTRUN -> [SKIP][42] ([fdo#109271]) +83 similar issues
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-skl8/igt@[email protected]
* igt@kms_color_chamelium@pipe-a-ctm-limited-range:
- shard-apl: NOTRUN -> [SKIP][43] ([fdo#109271] / [fdo#111827]) +17 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-apl1/igt@[email protected]
* igt@kms_color_chamelium@pipe-b-ctm-0-25:
- shard-tglb: NOTRUN -> [SKIP][44] ([fdo#109284] / [fdo#111827])
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-tglb7/igt@[email protected]
* igt@kms_color_chamelium@pipe-d-ctm-0-75:
- shard-skl: NOTRUN -> [SKIP][45] ([fdo#109271] / [fdo#111827]) +5 similar issues
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-skl3/igt@[email protected]
* igt@kms_color_chamelium@pipe-invalid-ctm-matrix-sizes:
- shard-snb: NOTRUN -> [SKIP][46] ([fdo#109271] / [fdo#111827]) +15 similar issues
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-snb5/igt@[email protected]
* igt@kms_color_chamelium@pipe-invalid-gamma-lut-sizes:
- shard-kbl: NOTRUN -> [SKIP][47] ([fdo#109271] / [fdo#111827]) +7 similar issues
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-kbl3/igt@[email protected]
* igt@kms_content_protection@atomic-dpms:
- shard-kbl: NOTRUN -> [TIMEOUT][48] ([i915#1319])
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-kbl1/igt@[email protected]
* igt@kms_content_protection@lic:
- shard-apl: NOTRUN -> [TIMEOUT][49] ([i915#1319]) +1 similar issue
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-apl8/igt@[email protected]
* igt@kms_cursor_crc@pipe-b-cursor-suspend:
- shard-apl: [PASS][50] -> [DMESG-WARN][51] ([i915#180])
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-apl7/igt@[email protected]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-apl6/igt@[email protected]
* igt@kms_cursor_crc@pipe-c-cursor-32x10-onscreen:
- shard-kbl: NOTRUN -> [SKIP][52] ([fdo#109271]) +63 similar issues
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-kbl6/igt@[email protected]
* igt@kms_flip@flip-vs-expired-vblank@a-edp1:
- shard-skl: [PASS][53] -> [FAIL][54] ([i915#79])
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-skl6/igt@kms_flip@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-skl4/igt@kms_flip@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible@c-dp1:
- shard-apl: NOTRUN -> [DMESG-WARN][55] ([i915#180]) +1 similar issue
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-apl8/igt@kms_flip@[email protected]
* igt@kms_flip@plain-flip-fb-recreate@b-edp1:
- shard-skl: [PASS][56] -> [FAIL][57] ([i915#2122])
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-skl1/igt@kms_flip@[email protected]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-skl8/igt@kms_flip@[email protected]
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-onoff:
- shard-snb: NOTRUN -> [SKIP][58] ([fdo#109271]) +291 similar issues
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-snb6/igt@[email protected]
* igt@kms_hdr@bpc-switch-dpms:
- shard-skl: [PASS][59] -> [FAIL][60] ([i915#1188])
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-skl6/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-skl4/igt@[email protected]
* igt@kms_pipe_crc_basic@read-crc-pipe-d-frame-sequence:
- shard-apl: NOTRUN -> [SKIP][61] ([fdo#109271] / [i915#533])
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-apl6/igt@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-d:
- shard-skl: NOTRUN -> [SKIP][62] ([fdo#109271] / [i915#533]) +1 similar issue
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-skl8/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-b-alpha-basic:
- shard-apl: NOTRUN -> [FAIL][63] ([fdo#108145] / [i915#265])
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-apl6/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb:
- shard-apl: NOTRUN -> [FAIL][64] ([i915#265]) +1 similar issue
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-apl2/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-alpha-7efc:
- shard-kbl: NOTRUN -> [FAIL][65] ([fdo#108145] / [i915#265])
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-kbl3/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
- shard-skl: [PASS][66] -> [FAIL][67] ([fdo#108145] / [i915#265]) +1 similar issue
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-skl8/igt@[email protected]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-skl6/igt@[email protected]
* igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
- shard-glk: [PASS][68] -> [FAIL][69] ([i915#1779])
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-glk7/igt@[email protected]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-glk3/igt@[email protected]
* igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
- shard-tglb: NOTRUN -> [SKIP][70] ([fdo#112054])
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-tglb7/igt@[email protected]
* igt@kms_plane_scaling@scaler-with-clipping-clamping@pipe-c-scaler-with-clipping-clamping:
- shard-apl: NOTRUN -> [SKIP][71] ([fdo#109271] / [i915#2733])
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-apl8/igt@kms_plane_scaling@scaler-with-clipping-clamping@pipe-c-scaler-with-clipping-clamping.html
* igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-1:
- shard-apl: NOTRUN -> [SKIP][72] ([fdo#109271] / [i915#658]) +3 similar issues
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-apl2/igt@[email protected]
* igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-4:
- shard-kbl: NOTRUN -> [SKIP][73] ([fdo#109271] / [i915#658]) +1 similar issue
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-kbl3/igt@[email protected]
* igt@kms_psr@psr2_primary_page_flip:
- shard-iclb: [PASS][74] -> [SKIP][75] ([fdo#109441]) +2 similar issues
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-iclb8/igt@kms_psr@psr2_primary_page_flip.html
* igt@kms_setmode@basic:
- shard-snb: NOTRUN -> [FAIL][76] ([i915#31])
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-snb6/igt@[email protected]
* igt@kms_vblank@pipe-c-accuracy-idle:
- shard-glk: [PASS][77] -> [FAIL][78] ([i915#43])
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-glk6/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-glk6/igt@[email protected]
* igt@nouveau_crc@pipe-b-ctx-flip-skip-current-frame:
- shard-apl: NOTRUN -> [SKIP][79] ([fdo#109271]) +237 similar issues
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-apl8/igt@[email protected]
* igt@sysfs_clients@create:
- shard-apl: NOTRUN -> [SKIP][80] ([fdo#109271] / [i915#2994]) +1 similar issue
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-apl1/igt@[email protected]
* igt@sysfs_clients@fair-3:
- shard-tglb: NOTRUN -> [SKIP][81] ([i915#2994])
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-tglb7/igt@[email protected]
* igt@sysfs_clients@split-50:
- shard-kbl: NOTRUN -> [SKIP][82] ([fdo#109271] / [i915#2994]) +2 similar issues
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-kbl3/igt@[email protected]
#### Possible fixes ####
* igt@gem_ctx_persistence@engines-hang@vcs0:
- {shard-rkl}: [FAIL][83] ([i915#2410]) -> [PASS][84]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-rkl-6/igt@gem_ctx_persistence@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-rkl-6/igt@gem_ctx_persistence@[email protected]
* igt@gem_exec_fair@basic-none-vip@rcs0:
- shard-kbl: [FAIL][85] ([i915#2842]) -> [PASS][86]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-kbl7/igt@gem_exec_fair@[email protected]
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-kbl7/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-pace@bcs0:
- shard-tglb: [FAIL][87] ([i915#2842]) -> [PASS][88]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-tglb1/igt@gem_exec_fair@[email protected]
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-tglb6/igt@gem_exec_fair@[email protected]
* igt@gem_exec_fair@basic-throttle@rcs0:
- {shard-rkl}: [FAIL][89] ([i915#2842]) -> [PASS][90]
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-rkl-1/igt@gem_exec_fair@[email protected]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-rkl-2/igt@gem_exec_fair@[email protected]
- shard-iclb: [FAIL][91] ([i915#2849]) -> [PASS][92]
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-iclb8/igt@gem_exec_fair@[email protected]
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-iclb6/igt@gem_exec_fair@[email protected]
* igt@gem_exec_suspend@basic-s3:
- shard-apl: [DMESG-WARN][93] ([i915#180]) -> [PASS][94]
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-apl2/igt@[email protected]
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-apl7/igt@[email protected]
* igt@kms_big_fb@x-tiled-64bpp-rotate-0:
- {shard-rkl}: [SKIP][95] ([i915#3638]) -> [PASS][96]
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-rkl-5/igt@[email protected]
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-rkl-6/igt@[email protected]
* igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip:
- {shard-rkl}: [SKIP][97] ([i915#3721]) -> [PASS][98] +1 similar issue
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-rkl-5/igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip.html
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-rkl-6/igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip.html
* igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_gen12_rc_ccs:
- {shard-rkl}: [FAIL][99] ([i915#3678]) -> [PASS][100] +1 similar issue
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-rkl-5/igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_gen12_rc_ccs.html
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-rkl-6/igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_gen12_rc_ccs.html
* igt@kms_color@pipe-a-ctm-0-75:
- {shard-rkl}: [SKIP][101] ([i915#1149] / [i915#1849]) -> [PASS][102] +2 similar issues
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-rkl-5/igt@[email protected]
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-rkl-6/igt@[email protected]
* igt@kms_cursor_crc@pipe-b-cursor-256x85-onscreen:
- {shard-rkl}: [SKIP][103] ([fdo#112022]) -> [PASS][104] +3 similar issues
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-rkl-5/igt@[email protected]
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-rkl-6/igt@[email protected]
* igt@kms_cursor_legacy@basic-flip-after-cursor-legacy:
- {shard-rkl}: [SKIP][105] ([fdo#111825]) -> [PASS][106] +1 similar issue
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-rkl-5/igt@[email protected]
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-rkl-6/igt@[email protected]
* igt@kms_fbcon_fbt@psr-suspend:
- {shard-rkl}: [SKIP][107] ([fdo#110189]) -> [PASS][108]
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-rkl-5/igt@[email protected]
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-rkl-6/igt@[email protected]
* igt@kms_flip@flip-vs-expired-vblank-interruptible@c-edp1:
- shard-skl: [FAIL][109] ([i915#79]) -> [PASS][110]
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-skl7/igt@kms_flip@[email protected]
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-skl6/igt@kms_flip@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible@a-dp1:
- shard-kbl: [DMESG-WARN][111] ([i915#180]) -> [PASS][112] +5 similar issues
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-kbl3/igt@kms_flip@[email protected]
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-kbl1/igt@kms_flip@[email protected]
* igt@kms_flip@plain-flip-fb-recreate@a-edp1:
- shard-skl: [FAIL][113] ([i915#2122]) -> [PASS][114]
[113]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-skl1/igt@kms_flip@[email protected]
[114]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-skl8/igt@kms_flip@[email protected]
* igt@kms_flip@plain-flip-ts-check-interruptible@b-hdmi-a1:
- shard-glk: [FAIL][115] ([i915#2122]) -> [PASS][116]
[115]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-glk9/igt@kms_flip@[email protected]
[116]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-glk3/igt@kms_flip@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-pgflip-blt:
- {shard-rkl}: [SKIP][117] ([i915#1849]) -> [PASS][118] +10 similar issues
[117]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-rkl-5/igt@[email protected]
[118]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-rkl-6/igt@[email protected]
* igt@kms_plane@plane-panning-bottom-right-suspend@pipe-b-planes:
- {shard-rkl}: [SKIP][119] ([i915#3558]) -> [PASS][120] +1 similar issue
[119]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-rkl-5/igt@kms_plane@[email protected]
[120]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-rkl-6/igt@kms_plane@[email protected]
* igt@kms_plane_multiple@atomic-pipe-c-tiling-x:
- {shard-rkl}: [SKIP][121] ([i915#1849] / [i915#3558]) -> [PASS][122] +1 similar issue
[121]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-rkl-5/igt@[email protected]
[122]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-rkl-6/igt@[email protected]
* igt@kms_psr@cursor_mmap_gtt:
- {shard-rkl}: [SKIP][123] ([i915#1072]) -> [PASS][124]
[123]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-rkl-5/igt@kms_psr@cursor_mmap_gtt.html
[124]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-rkl-6/igt@kms_psr@cursor_mmap_gtt.html
* igt@kms_psr@psr2_cursor_blt:
- shard-iclb: [SKIP][125] ([fdo#109441]) -> [PASS][126] +1 similar issue
[125]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-iclb1/igt@kms_psr@psr2_cursor_blt.html
[126]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-iclb2/igt@kms_psr@psr2_cursor_blt.html
* igt@kms_vblank@pipe-c-wait-busy:
- {shard-rkl}: [SKIP][127] ([i915#1845]) -> [PASS][128] +6 similar issues
[127]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-rkl-5/igt@[email protected]
[128]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-rkl-6/igt@[email protected]
* igt@perf@polling:
- {shard-rkl}: [FAIL][129] ([i915#1542]) -> [PASS][130]
[129]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-rkl-5/igt@[email protected]
[130]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-rkl-1/igt@[email protected]
* igt@sysfs_preempt_timeout@timeout@rcs0:
- {shard-rkl}: [FAIL][131] ([i915#2821]) -> [PASS][132] +3 similar issues
[131]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-rkl-5/igt@sysfs_preempt_timeout@[email protected]
[132]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-rkl-1/igt@sysfs_preempt_timeout@[email protected]
#### Warnings ####
* igt@i915_pm_rc6_residency@rc6-idle:
- shard-iclb: [FAIL][133] ([i915#2680]) -> [WARN][134] ([i915#2684])
[133]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-iclb6/igt@[email protected]
[134]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-iclb1/igt@[email protected]
* igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-2:
- shard-iclb: [SKIP][135] ([i915#2920]) -> [SKIP][136] ([i915#658]) +2 similar issues
[135]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-iclb2/igt@[email protected]
[136]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-iclb8/igt@[email protected]
* igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-2:
- shard-iclb: [SKIP][137] ([i915#658]) -> [SKIP][138] ([i915#2920])
[137]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10457/shard-iclb7/igt@[email protected]
[138]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/shard-iclb2/igt@[email protected]
* igt@runner@aborted:
- shard-kbl: ([FAIL][139], [FAIL][140], [FAIL][141], [FAIL][142], [FAIL][143], [FAIL][144], [FAIL][145], [FAIL][146], [FAIL][147], [FAIL][148]) ([fdo#109271] / [i915#180] / [i915#1814] / [i915#3002] / [i915#3363] / [i915#92]) -> ([FAIL][149], [FAIL][150], [FAIL][151], [FAIL][152], [FAIL][153], [FAIL][154], [FAIL][155], [FAIL][156], [FAIL][157], [FAIL][158], [FAIL][159], [FAIL][160], [FAIL][161], [FAIL][162]) ([i915#1436] / [i915#180] / [i915#1814] / [i915#2263] / [i915#2426] / [i915#2505] / [i915#3002] / [i915#3363] /
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_20784/index.html
Quoted 8 lines · On August 6, 2021 15:18:59 Daniel Vetter <[email protected]> wrote:
gem context refcounting is another exercise in least locking design it seems, where most things get destroyed upon context closure (which can race with anything really). Only the actual memory allocation and the locks survive while holding a reference.
This tripped up Jason when reimplementing the single timeline feature in
Quoted 7 lines
commit
00dae4d3d35d4f526929633b76e00b0ab4d3970dAuthor: Jason Ekstrand <[email protected]> Date: Thu Jul 8 10:48:12 2021 -0500drm/i915: Implement
SINGLE_TIMELINEwith a syncobj (v4)We could fix the bug by holding
ctx->mutex, but it's cleaner to just
What bug is this fixing, exactly?
--Jason
Quoted 45 lines
make the context object actually invariant over its _entire_ lifetime.
Signed-off-by Daniel Vetter <[email protected]>Fixes 00dae4d3d35d ("drm/i915: Implement SINGLE_TIMELINE with a syncobj (v4)")Cc Jason Ekstrand <[email protected]>Cc Chris Wilson <[email protected]>Cc Tvrtko Ursulin <[email protected]>Cc Joonas Lahtinen <[email protected]>Cc Matthew Brost <[email protected]>Cc Matthew Auld <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc "Thomas Hellström" <[email protected]>Cc Lionel Landwerlin <[email protected]>Cc Dave Airlie <[email protected]>---
drivers/gpu/drm/i915/gem/i915_gem_context.c| 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/gem/i915_gem_context.c +3
-4@@ -940,6 +940,9 @@ void i915_gem_context_release(struct kref *ref)trace_i915_context_free (ctx);GEM_BUG_ON (!i915_gem_context_is_closed (ctx)); +if (ctx->syncobj) +drm_syncobj_put (ctx->syncobj); +mutex_destroy (&ctx->engines_mutex);mutex_destroy (&ctx->lut_mutex);@@ -1159,9 +1162,6 @@ static void context_close(struct i915_gem_context *ctx)if (vm)i915_vm_close (vm); -if (ctx->syncobj) -drm_syncobj_put (ctx->syncobj); - ctx->file_priv =ERR_PTR (-EBADF );/* -- 2.32.0
Quoted 15 lines · Jason Ekstrand
Quoted 12 lines · On August 6, 2021 15:18:59 Daniel Vetter <[email protected]> wrote:
gem context refcounting is another exercise in least locking design it seems, where most things get destroyed upon context closure (which can race with anything really). Only the actual memory allocation and the locks survive while holding a reference.
This tripped up Jason when reimplementing the single timeline feature in
commit
00dae4d3d35d4f526929633b76e00b0ab4d3970dAuthor: Jason Ekstrand <[email protected]> Date: Thu Jul 8 10:48:12 2021 -0500
Quoted 6 lines
Quoted 3 lines
drm/i915: Implement
SINGLE_TIMELINEwith a syncobj (v4)We could fix the bug by holding
ctx->mutex, but it's cleaner to justWhat bug is this fixing, exactly?
Oh lol I was all busy ranting and not explaining :-) I found it while auditing other context stuff, so that other patch has the longer commit message with more history, but that patch is also now tied into the vm-dercuify, so short summary: You put the syncobj in context close (i.e. CTX_DESTRY ioctl or close(drmfd)), not in the final kref_put. Which means you're open to a use-after-free if you race against an execbuf. ctx->vm is equally broken (but for other ioctl), once this fix here is merged I send out the ctx->vm fix because that's tied into the vm-dercuify now due to conflicts.
-Daniel
Quoted 50 lines
--Jason
Quoted 45 lines
make the context object actually invariant over its _entire_ lifetime.
Signed-off-by Daniel Vetter <[email protected]>Fixes 00dae4d3d35d ("drm/i915: Implement SINGLE_TIMELINE with a syncobj (v4)")Cc Jason Ekstrand <[email protected]>Cc Chris Wilson <[email protected]>Cc Tvrtko Ursulin <[email protected]>Cc Joonas Lahtinen <[email protected]>Cc Matthew Brost <[email protected]>Cc Matthew Auld <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc "Thomas Hellström" <[email protected]>Cc Lionel Landwerlin <[email protected]>Cc Dave Airlie <[email protected]>--- drivers/gpu/drm/i915/gem/i915_gem_context.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/gem/i915_gem_context.c +3
-4@@ -940,6 +940,9 @@ void i915_gem_context_release(struct kref *ref)trace_i915_context_free (ctx);GEM_BUG_ON (!i915_gem_context_is_closed (ctx)); +if (ctx->syncobj) +drm_syncobj_put (ctx->syncobj); +mutex_destroy (&ctx->engines_mutex);mutex_destroy (&ctx->lut_mutex);@@ -1159,9 +1162,6 @@ static void context_close(struct i915_gem_context *ctx)if (vm)i915_vm_close (vm); -if (ctx->syncobj) -drm_syncobj_put (ctx->syncobj); - ctx->file_priv =ERR_PTR (-EBADF );/* -- 2.32.0
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Quoted 23 lines · Daniel Vetter
Quoted 15 lines · Jason Ekstrand
Quoted 12 lines · On August 6, 2021 15:18:59 Daniel Vetter <[email protected]> wrote:
gem context refcounting is another exercise in least locking design it seems, where most things get destroyed upon context closure (which can race with anything really). Only the actual memory allocation and the locks survive while holding a reference.
This tripped up Jason when reimplementing the single timeline feature in
commit
00dae4d3d35d4f526929633b76e00b0ab4d3970dAuthor: Jason Ekstrand <[email protected]> Date: Thu Jul 8 10:48:12 2021 -0500Quoted 6 lines
Quoted 3 lines
drm/i915: Implement
SINGLE_TIMELINEwith a syncobj (v4)We could fix the bug by holding
ctx->mutex, but it's cleaner to justWhat bug is this fixing, exactly?
Quoted 9 lines
Oh lol I was all busy ranting and not explaining :-) I found it while auditing other context stuff, so that other patch has the longer commit message with more history, but that patch is also now tied into the vm-dercuify, so short summary: You put the syncobj in context close (i.e.
CTX_DESTRYioctl or close(drmfd)), not in the finalkref_put. Which means you're open to a use-after-free if you race against an execbuf.ctx->vmis equally broken (but for other ioctl), once this fix here is merged I send out thectx->vmfix because that's tied into the vm-dercuify now due to conflicts.
CI caught more, so just explaining what I'm fixing here isn't going to be enough.
The troubel is that drm_syncobj_put is now called from very awkward places, and I need to see whether we can fix that. Or whether we need more work_struct (like we have already for i915_address_space) for the final release.
-Daniel
Quoted 58 lines
-Daniel
Quoted 50 lines
--Jason
Quoted 45 lines
make the context object actually invariant over its _entire_ lifetime.
Signed-off-by Daniel Vetter <[email protected]>Fixes 00dae4d3d35d ("drm/i915: Implement SINGLE_TIMELINE with a syncobj (v4)")Cc Jason Ekstrand <[email protected]>Cc Chris Wilson <[email protected]>Cc Tvrtko Ursulin <[email protected]>Cc Joonas Lahtinen <[email protected]>Cc Matthew Brost <[email protected]>Cc Matthew Auld <[email protected]>Cc Maarten Lankhorst <[email protected]>Cc "Thomas Hellström" <[email protected]>Cc Lionel Landwerlin <[email protected]>Cc Dave Airlie <[email protected]>--- drivers/gpu/drm/i915/gem/i915_gem_context.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/gem/i915_gem_context.c +3
-4@@ -940,6 +940,9 @@ void i915_gem_context_release(struct kref *ref)trace_i915_context_free (ctx);GEM_BUG_ON (!i915_gem_context_is_closed (ctx)); +if (ctx->syncobj) +drm_syncobj_put (ctx->syncobj); +mutex_destroy (&ctx->engines_mutex);mutex_destroy (&ctx->lut_mutex);@@ -1159,9 +1162,6 @@ static void context_close(struct i915_gem_context *ctx)if (vm)i915_vm_close (vm); -if (ctx->syncobj) -drm_syncobj_put (ctx->syncobj); - ctx->file_priv =ERR_PTR (-EBADF );/* -- 2.32.0
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch