Skip to contentSkip to conversation

lib/igt_device_scan: init card in igt_device_find_first_i915_discrete_card()

PATCH Superseded Lyude 3 participants 4 messages Sep 30, 2020 – Oct 1, 2020 Library code

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Lyude

author
#0 lore raw

PATCH 1/1 lib/igt_device_scan: init card in igt_device_find_first_i915_discrete_card()

From: Lyude Paul <[email protected]>

Because we never initialize the card pointer passed to igt_device_find_first_i915_discrete_card() if we don't match any cards, we make the mistake of checking the contents of card in main() in intel_gpu_top.c before they've actually been initialized, which can lead to a segfault in some scenarios:

   # intel_gpu_top
   intel_gpu_top: ../tools/intel_gpu_top.c:1297: tr_pmu_name: Assertion `ret == (bufsize-1)' failed.
   abort--core dumped

So, fix it by making sure to initialize card in igt_device_find_first_i915_discrete_card() like we do in igt_device_card_match().

Fedora bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1884016

---
 lib/igt_device_scan.c | 2 ++
 1 file changed, 2 insertions(+)
lib/igt_device_scan.c +2 -0
index 345bae76..d77311a4 100644
@@ -453,6 +453,8 @@ void igt_device_find_first_i915_discrete_card(struct igt_device_card *card)
 {
 	struct igt_device *dev;
 
+	memset(card, 0, sizeof(*card));
+
 	igt_list_for_each_entry(dev, &igt_devs.all, link) {
 
 		if (!is_pci_subsystem(dev))
Signature · 6 lines
2.26.2

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

[igt-dev] ✓ Fi.CI.BAT: success for lib/igt_device_scan: init card in igt_device_find_first_i915_discrete_card()

== Series Details ==

== Series Details ==

Series: lib/igt_device_scan: init card in igt_device_find_first_i915_discrete_card()
URL : https://patchwork.freedesktop.org/series/82272/
State : success

== Summary ==

CI Bug Log - changes from IGT_5795 -> IGTPW_5034
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/index.html

Known issues
------------

Here are the changes found in IGTPW_5034 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-bsw-kefka: [PASS][1] -> [DMESG-WARN][2] ([i915#1982])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/fi-bsw-kefka/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/fi-bsw-kefka/igt@[email protected]

* igt@i915_selftest@live@execlists:
- fi-skl-6700k2: [PASS][3] -> [INCOMPLETE][4] ([CI#80] / [i915#1795])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/fi-skl-6700k2/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/fi-skl-6700k2/igt@i915_selftest@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-bsw-n3050: [PASS][5] -> [DMESG-WARN][6] ([i915#1982])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/fi-bsw-n3050/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/fi-bsw-n3050/igt@[email protected]

* igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
- fi-icl-u2: [PASS][7] -> [DMESG-WARN][8] ([i915#1982]) +1 similar issue
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/fi-icl-u2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/fi-icl-u2/igt@[email protected]

* igt@vgem_basic@unload:
- fi-skl-guc: [PASS][9] -> [DMESG-WARN][10] ([i915#2203])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/fi-skl-guc/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/fi-skl-guc/igt@[email protected]

#### Possible fixes ####

* igt@i915_module_load@reload:
- fi-icl-y: [DMESG-WARN][11] ([i915#1982]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/fi-icl-y/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/fi-icl-y/igt@[email protected]

* igt@kms_flip@basic-flip-vs-wf_vblank@b-edp1:
- fi-icl-u2: [DMESG-WARN][13] ([i915#1982]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/fi-icl-u2/igt@kms_flip@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/fi-icl-u2/igt@kms_flip@[email protected]

#### Warnings ####

* igt@debugfs_test@read_all_entries:
- fi-kbl-x1275: [DMESG-WARN][15] ([i915#62] / [i915#92]) -> [DMESG-WARN][16] ([i915#62] / [i915#92] / [i915#95]) +2 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/fi-kbl-x1275/igt@debugfs_test@read_all_entries.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/fi-kbl-x1275/igt@debugfs_test@read_all_entries.html

* igt@kms_cursor_legacy@basic-flip-before-cursor-varying-size:
- fi-kbl-x1275: [DMESG-WARN][17] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][18] ([i915#62] / [i915#92]) +3 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/fi-kbl-x1275/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/fi-kbl-x1275/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[CI#80]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/80
[i915#1795]: https://gitlab.freedesktop.org/drm/intel/issues/1795
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2203]: https://gitlab.freedesktop.org/drm/intel/issues/2203
[i915#2524]: https://gitlab.freedesktop.org/drm/intel/issues/2524
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
[i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95

Participating hosts (45 -> 38)
------------------------------

Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus

Build changes
-------------

* CI: CI-20190529 -> None
* IGT: IGT_5795 -> IGTPW_5034

CI-20190529: 20190529
CI_DRM_9081: 134739e6ec0aa2efba634e855481be724443393a @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_5034: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/index.html
IGT_5795: ec36877d20168c2298cd213b7a765cc67c3637f4 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/index.html

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#2 lore raw

[igt-dev] ✗ Fi.CI.IGT: failure for lib/igt_device_scan: init card in igt_device_find_first_i915_discrete_card()

In reply to Lyude
== Series Details ==

== Series Details ==

Series: lib/igt_device_scan: init card in igt_device_find_first_i915_discrete_card()
URL : https://patchwork.freedesktop.org/series/82272/
State : failure

== Summary ==

CI Bug Log - changes from IGT_5795_full -> IGTPW_5034_full
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_5034_full absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_5034_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/index.html

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in IGTPW_5034_full:

### IGT changes ###

#### Possible regressions ####

* igt@perf_pmu@rc6-runtime-pm-long:
- shard-glk: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-glk5/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-glk9/igt@[email protected]

Known issues
------------

Here are the changes found in IGTPW_5034_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_reloc@basic-many-active@rcs0:
- shard-apl: [PASS][3] -> [FAIL][4] ([i915#1635] / [i915#2389])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-apl6/igt@gem_exec_reloc@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-apl2/igt@gem_exec_reloc@[email protected]

* igt@gem_exec_whisper@basic-queues-all:
- shard-glk: [PASS][5] -> [DMESG-WARN][6] ([i915#118] / [i915#95]) +1 similar issue
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-glk1/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-glk8/igt@[email protected]

* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [PASS][7] -> [FAIL][8] ([i915#454])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-iclb4/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-iclb6/igt@[email protected]

* igt@i915_selftest@live@hangcheck:
- shard-snb: [PASS][9] -> [INCOMPLETE][10] ([i915#82])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-snb5/igt@i915_selftest@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-snb2/igt@i915_selftest@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-kbl: [PASS][11] -> [DMESG-WARN][12] ([i915#180]) +2 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-kbl1/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-kbl6/igt@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor-crc-legacy:
- shard-kbl: [PASS][13] -> [DMESG-WARN][14] ([i915#1982])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-kbl1/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-kbl1/igt@[email protected]

* igt@kms_cursor_legacy@pipe-b-torture-move:
- shard-iclb: [PASS][15] -> [DMESG-WARN][16] ([i915#128])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-iclb3/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-iclb3/igt@[email protected]

* igt@kms_draw_crc@draw-method-xrgb2101010-pwrite-untiled:
- shard-apl: [PASS][17] -> [DMESG-WARN][18] ([i915#1635] / [i915#1982]) +2 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-apl6/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-apl4/igt@[email protected]

* igt@kms_flip@2x-flip-vs-wf_vblank-interruptible@ab-vga1-hdmi-a1:
- shard-hsw: [PASS][19] -> [DMESG-WARN][20] ([i915#1982])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-hsw1/igt@kms_flip@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-hsw6/igt@kms_flip@[email protected]

* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-shrfb-pgflip-blt:
- shard-glk: [PASS][21] -> [DMESG-WARN][22] ([i915#1982])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-glk5/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-glk2/igt@[email protected]

* igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-cpu:
- shard-tglb: [PASS][23] -> [DMESG-WARN][24] ([i915#1982]) +4 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-tglb6/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-cpu.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-tglb5/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-cpu.html

* igt@kms_psr2_su@frontbuffer:
- shard-tglb: [PASS][25] -> [SKIP][26] ([i915#1911])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-tglb5/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-tglb5/igt@[email protected]
- shard-iclb: [PASS][27] -> [SKIP][28] ([fdo#109642] / [fdo#111068])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-iclb2/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-iclb3/igt@[email protected]

* igt@kms_psr@psr2_cursor_render:
- shard-iclb: [PASS][29] -> [SKIP][30] ([fdo#109441]) +2 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-iclb4/igt@kms_psr@psr2_cursor_render.html

* igt@kms_setmode@basic:
- shard-hsw: [PASS][31] -> [FAIL][32] ([i915#31])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-hsw1/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-hsw7/igt@[email protected]

* igt@perf@disabled-read-error:
- shard-glk: [PASS][33] -> [SKIP][34] ([fdo#109271])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-glk8/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-glk4/igt@[email protected]
- shard-apl: [PASS][35] -> [SKIP][36] ([fdo#109271] / [i915#1635])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-apl1/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-apl3/igt@[email protected]
- shard-kbl: [PASS][37] -> [SKIP][38] ([fdo#109271])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-kbl4/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-kbl6/igt@[email protected]
- shard-tglb: [PASS][39] -> [SKIP][40] ([i915#405])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-tglb6/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-tglb5/igt@[email protected]
- shard-hsw: [PASS][41] -> [SKIP][42] ([fdo#109271])
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-hsw8/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-hsw2/igt@[email protected]
- shard-iclb: [PASS][43] -> [SKIP][44] ([i915#405])
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-iclb8/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-iclb3/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_reloc@basic-many-active@vecs0:
- shard-glk: [FAIL][45] ([i915#2389]) -> [PASS][46] +1 similar issue
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-glk2/igt@gem_exec_reloc@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-glk6/igt@gem_exec_reloc@[email protected]

* igt@gem_exec_whisper@basic-contexts-forked:
- shard-glk: [DMESG-WARN][47] ([i915#118] / [i915#95]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-glk7/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-glk3/igt@[email protected]

* igt@kms_big_fb@y-tiled-8bpp-rotate-0:
- shard-kbl: [DMESG-WARN][49] ([i915#1982]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-kbl7/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-kbl2/igt@[email protected]

* igt@kms_flip@2x-wf_vblank-ts-check-interruptible@ab-vga1-hdmi-a1:
- shard-hsw: [DMESG-WARN][51] ([i915#1982]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-hsw6/igt@kms_flip@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-hsw5/igt@kms_flip@[email protected]

* igt@kms_frontbuffer_tracking@fbc-shrfb-scaledprimary:
- shard-tglb: [DMESG-WARN][53] ([i915#1982]) -> [PASS][54] +2 similar issues
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-tglb1/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-tglb3/igt@[email protected]

* igt@kms_psr@psr2_primary_mmap_cpu:
- shard-iclb: [SKIP][55] ([fdo#109441]) -> [PASS][56] +3 similar issues
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-iclb8/igt@kms_psr@psr2_primary_mmap_cpu.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html

* igt@perf_pmu@module-unload:
- shard-iclb: [DMESG-WARN][57] ([i915#1982]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-iclb5/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-iclb8/igt@[email protected]

#### Warnings ####

* igt@i915_pm_dc@dc3co-vpb-simulation:
- shard-tglb: [DMESG-WARN][59] ([i915#2411]) -> [SKIP][60] ([i915#1904])
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-tglb5/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-tglb2/igt@[email protected]
- shard-iclb: [SKIP][61] ([i915#588]) -> [SKIP][62] ([i915#658])
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-iclb2/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-iclb5/igt@[email protected]

* igt@kms_dp_dsc@basic-dsc-enable-edp:
- shard-iclb: [SKIP][63] ([fdo#109349]) -> [DMESG-WARN][64] ([i915#1226])
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5795/shard-iclb8/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/shard-iclb2/igt@[email protected]

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1226]: https://gitlab.freedesktop.org/drm/intel/issues/1226
[i915#128]: https://gitlab.freedesktop.org/drm/intel/issues/128
[i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1904]: https://gitlab.freedesktop.org/drm/intel/issues/1904
[i915#1911]: https://gitlab.freedesktop.org/drm/intel/issues/1911
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2389]: https://gitlab.freedesktop.org/drm/intel/issues/2389
[i915#2411]: https://gitlab.freedesktop.org/drm/intel/issues/2411
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#405]: https://gitlab.freedesktop.org/drm/intel/issues/405
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#588]: https://gitlab.freedesktop.org/drm/intel/issues/588
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95

Participating hosts (8 -> 8)
------------------------------

No changes in participating hosts

Build changes
-------------

* CI: CI-20190529 -> None
* IGT: IGT_5795 -> IGTPW_5034

CI-20190529: 20190529
CI_DRM_9081: 134739e6ec0aa2efba634e855481be724443393a @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_5034: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/index.html
IGT_5795: ec36877d20168c2298cd213b7a765cc67c3637f4 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5034/index.html

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#3 lore raw
In reply to Lyude
Quoted 29 lines · Lyude

From: Lyude Paul <[email protected]>

Because we never initialize the card pointer passed to igt_device_find_first_i915_discrete_card() if we don't match any cards, we make the mistake of checking the contents of card in main() in intel_gpu_top.c before they've actually been initialized, which can lead to a segfault in some scenarios:

   # intel_gpu_top
   intel_gpu_top: ../tools/intel_gpu_top.c:1297: tr_pmu_name: Assertion `ret == (bufsize-1)' failed.
   abort--core dumped

So, fix it by making sure to initialize card in igt_device_find_first_i915_discrete_card() like we do in igt_device_card_match().

Fedora bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1884016

---
 lib/igt_device_scan.c | 2 ++
 1 file changed, 2 insertions(+)
lib/igt_device_scan.c +0 -0
index 345bae76..d77311a4 100644

lib/igt_device_scan.c void igt_device_find_first_i915_discrete_card(struct igt_device_card *card) · line 460

Quoted 8 lines
lib/igt_device_scan.c +2 -0
@@ -453,6 +453,8 @@ void igt_device_find_first_i915_discrete_card(struct igt_device_card *card)
 {
 	struct igt_device *dev;
 
+	memset(card, 0, sizeof(*card));
+
 	igt_list_for_each_entry(dev, &igt_devs.all, link) {
 
 		if (!is_pci_subsystem(dev))

Maybe this function should return boolean does card was found or not? This will require change in intel_gpu_top and check return value but is more intuitive and appropriate message can be show that card is not found.

--
Zbigniew

Quoted 6 lines

2.26.2

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev