Skip to contentSkip to conversation

gpu: drm: i915: fix error return code of igt_threaded_blt()

PATCH In review Jia-Ju Bai 3 participants 3 messages Mar 8, 2021

Subsystems (2)
lore
Share & tools
lore

Jia-Ju Bai

author
#0 lore raw

PATCH 1/1 gpu: drm: i915: fix error return code of igt_threaded_blt()

When kcalloc() returns NULL to tsk or thread, no error code of igt_threaded_blt() is returned.
To fix this bug, -ENOMEM is returned as error code.

Fixes 0e99f939f08f ("drm/i915/selftests/blt: add some kthreads into the mix")
---
 drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +4 -2
index 23b6e11bbc3e..b54ba8a1fcec 100644
@@ -471,11 +471,13 @@ static int igt_threaded_blt(struct intel_engine_cs *engine,
 
 	tsk = kcalloc(n_cpus, sizeof(struct task_struct *), GFP_KERNEL);
 	if (!tsk)
-		return 0;
+		return -ENOMEM;
 
 	thread = kcalloc(n_cpus, sizeof(struct igt_thread_arg), GFP_KERNEL);
-	if (!thread)
+	if (!thread) {
+		err = -ENOMEM;
 		goto out_tsk;
+	}
 
 	thread[0].file = mock_file(engine->i915);
 	if (IS_ERR(thread[0].file)) {
Signature · 6 lines
2.17.1

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

Quoting Jia-Ju Bai (2021-03-08 09:07:22)

Quoted 3 lines

When kcalloc() returns NULL to tsk or thread, no error code of igt_threaded_blt() is returned.
To fix this bug, -ENOMEM is returned as error code.

Because we decided to skip the test if it could not be run due to insufficient memory, as opposed to an internal allocation failure from the driver.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for gpu: drm: i915: fix error return code of igt_threaded_blt()

In reply to Jia-Ju Bai
== Series Details ==

== Series Details ==

Series: gpu: drm: i915: fix error return code of igt_threaded_blt()
URL : https://patchwork.freedesktop.org/series/87765/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_9838 -> Patchwork_19766
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes introduced in Patchwork_19766, 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/Patchwork_19766/index.html

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@execlists:
- fi-cfl-8109u: [PASS][1] -> [DMESG-WARN][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9838/fi-cfl-8109u/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19766/fi-cfl-8109u/igt@i915_selftest@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_gttfill@basic:
- fi-kbl-8809g: [PASS][3] -> [TIMEOUT][4] ([i915#3145]) +1 similar issue
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9838/fi-kbl-8809g/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19766/fi-kbl-8809g/igt@[email protected]

* igt@i915_selftest@live@late_gt_pm:
- fi-cfl-8109u: [PASS][5] -> [DMESG-WARN][6] ([i915#203]) +2 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9838/fi-cfl-8109u/igt@i915_selftest@live@late_gt_pm.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19766/fi-cfl-8109u/igt@i915_selftest@live@late_gt_pm.html

#### Possible fixes ####

* igt@gem_linear_blits@basic:
- fi-kbl-8809g: [TIMEOUT][7] ([i915#2502] / [i915#3145]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9838/fi-kbl-8809g/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19766/fi-kbl-8809g/igt@[email protected]

* igt@gem_tiled_blits@basic:
- fi-kbl-8809g: [TIMEOUT][9] ([i915#3145]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9838/fi-kbl-8809g/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19766/fi-kbl-8809g/igt@[email protected]

* igt@kms_frontbuffer_tracking@basic:
- {fi-rkl-11500t}: [SKIP][11] -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9838/fi-rkl-11500t/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19766/fi-rkl-11500t/igt@[email protected]

* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b:
- {fi-tgl-dsi}: [DMESG-WARN][13] ([i915#402]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9838/fi-tgl-dsi/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19766/fi-tgl-dsi/igt@[email protected]

#### Warnings ####

* igt@i915_pm_rpm@module-reload:
- fi-glk-dsi: [DMESG-WARN][15] ([i915#3143]) -> [DMESG-WARN][16] ([i915#1982] / [i915#3143])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9838/fi-glk-dsi/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19766/fi-glk-dsi/igt@[email protected]

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

[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#203]: https://gitlab.freedesktop.org/drm/intel/issues/203
[i915#2502]: https://gitlab.freedesktop.org/drm/intel/issues/2502
[i915#3143]: https://gitlab.freedesktop.org/drm/intel/issues/3143
[i915#3145]: https://gitlab.freedesktop.org/drm/intel/issues/3145
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402

Participating hosts (46 -> 41)
------------------------------

Missing (5): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-icl-y fi-bdw-samus

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

* Linux: CI_DRM_9838 -> Patchwork_19766

CI-20190529: 20190529
CI_DRM_9838: 18041d32fb75fb42a0b6c8d26529dba5cf4afcf6 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6024: d8e03fe437f0c328c96717a92ad97719c02ba2cd @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_19766: 8423b9a9d94492cde592a40efa26d79848bbceaa @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

8423b9a9d944 gpu: drm: i915: fix error return code of igt_threaded_blt()

== Logs ==

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

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