drm/i915/gvt: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe()
PATCH 1/1 drm/i915/gvt: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe()
Using DEFINE_DEBUGFS_ATTRIBUTE macro with debugfs_create_file_unsafe() function in place of the debugfs_create_file() function will make the file operation struct "reset" aware of the file's lifetime. Additional details here: https://lists.archive.carbon60.com/linux/kernel/2369498
Issue reported by Coccinelle script:scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci
---
Please Note: This is a Outreachy project task patch.
drivers/gpu/drm/i915/gvt/debugfs.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/gvt/debugfs.c +4 -5
@@ -147,9 +147,8 @@ vgpu_scan_nonprivbb_set(void *data, u64 val)return 0 ; } -DEFINE_SIMPLE_ATTRIBUTE (vgpu_scan_nonprivbb_fops, - vgpu_scan_nonprivbb_get, vgpu_scan_nonprivbb_set, -"0x%llx\n" ); +DEFINE_DEBUGFS_ATTRIBUTE (vgpu_scan_nonprivbb_fops, vgpu_scan_nonprivbb_get, + vgpu_scan_nonprivbb_set,"0x%llx\n" );/** * intel_gvt_debugfs_add_vgpu - register debugfs entries for a vGPU
@@ -165,8 +164,8 @@ void intel_gvt_debugfs_add_vgpu(struct intel_vgpu *vgpu)debugfs_create_bool ("active" ,0444 , vgpu->debugfs, &vgpu->active);debugfs_create_file ("mmio_diff" ,0444 , vgpu->debugfs, vgpu, &vgpu_mmio_diff_fops); -debugfs_create_file ("scan_nonprivbb" ,0644 , vgpu->debugfs, vgpu, - &vgpu_scan_nonprivbb_fops); +debugfs_create_file_unsafe ("scan_nonprivbb" ,0644 , vgpu->debugfs, vgpu, + &vgpu_scan_nonprivbb_fops); }/**
Signature · 1 line
2.25.1
Jani Nikula
maintainerQuoted 4 lines · Deepak R Varma
Using
DEFINE_DEBUGFS_ATTRIBUTEmacro withdebugfs_create_file_unsafe()function in place of thedebugfs_create_file()function will make the file operation struct "reset" aware of the file's lifetime. Additional details here: https://lists.archive.carbon60.com/linux/kernel/2369498
Please describe what the functional impact is in the commit message. I don't understand what 'make the file operation struct "reset" aware of the file's lifetime' means here.
For referencing LKML posts, please prefer https://lore.kernel.org/.
For referencing commits already in the kernel, please prefer the format c64688081490 ("debugfs: add support for self-protecting attribute file fops").
BR,
Jani.
Quoted 38 lines
Issue reported by Coccinelle script:
scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocciSigned-off-by Deepak R Varma <[email protected]>---
Please Note: This is a Outreachy project task patch.drivers/gpu/drm/i915/gvt/debugfs.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/gvt/debugfs.c +4
-5@@ -147,9 +147,8 @@ vgpu_scan_nonprivbb_set(void *data, u64 val)return 0 ; } -DEFINE_SIMPLE_ATTRIBUTE (vgpu_scan_nonprivbb_fops, - vgpu_scan_nonprivbb_get, vgpu_scan_nonprivbb_set, -"0x%llx\n" ); +DEFINE_DEBUGFS_ATTRIBUTE (vgpu_scan_nonprivbb_fops, vgpu_scan_nonprivbb_get, + vgpu_scan_nonprivbb_set,"0x%llx\n" );/** * intel_gvt_debugfs_add_vgpu - register debugfs entries for a vGPU @@ -165,8 +164,8 @@ void intel_gvt_debugfs_add_vgpu(struct intel_vgpu *vgpu)debugfs_create_bool ("active" ,0444 , vgpu->debugfs, &vgpu->active);debugfs_create_file ("mmio_diff" ,0444 , vgpu->debugfs, vgpu, &vgpu_mmio_diff_fops); -debugfs_create_file ("scan_nonprivbb" ,0644 , vgpu->debugfs, vgpu, - &vgpu_scan_nonprivbb_fops); +debugfs_create_file_unsafe ("scan_nonprivbb" ,0644 , vgpu->debugfs, vgpu, + &vgpu_scan_nonprivbb_fops); }/**
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/gvt: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe()
In reply to Deepak R Varma== Series Details ==
== Series Details ==
Series: drm/i915/gvt: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe()
URL : https://patchwork.freedesktop.org/series/83291/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_9229 -> Patchwork_18818
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_18818 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_18818, 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_18818/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_18818:
### IGT changes ###
#### Possible regressions ####
* igt@i915_module_load@reload:
- fi-skl-lmem: [PASS][1] -> [DMESG-WARN][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9229/fi-skl-lmem/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18818/fi-skl-lmem/igt@[email protected]
New tests
---------
New tests have been introduced between CI_DRM_9229 and Patchwork_18818:
### New CI tests (1) ###
* boot:
- Statuses : 40 pass(s)
- Exec time: [0.0] s
Known issues
------------
Here are the changes found in Patchwork_18818 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_chamelium@dp-crc-fast:
- fi-kbl-7500u: [PASS][3] -> [DMESG-WARN][4] ([i915#1982])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9229/fi-kbl-7500u/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18818/fi-kbl-7500u/igt@[email protected]
* igt@kms_cursor_legacy@basic-flip-after-cursor-legacy:
- fi-icl-u2: [PASS][5] -> [DMESG-WARN][6] ([i915#1982])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9229/fi-icl-u2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18818/fi-icl-u2/igt@[email protected]
* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b:
- fi-cfl-8109u: [PASS][7] -> [DMESG-WARN][8] ([i915#165]) +15 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9229/fi-cfl-8109u/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18818/fi-cfl-8109u/igt@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-skl-6700k2: [PASS][9] -> [INCOMPLETE][10] ([i915#146] / [i915#198])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9229/fi-skl-6700k2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18818/fi-skl-6700k2/igt@[email protected]
#### Possible fixes ####
* igt@i915_module_load@reload:
- fi-tgl-u2: [DMESG-WARN][11] ([i915#1982] / [k.org#205379]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9229/fi-tgl-u2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18818/fi-tgl-u2/igt@[email protected]
* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-byt-j1900: [DMESG-WARN][13] ([i915#1982]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9229/fi-byt-j1900/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18818/fi-byt-j1900/igt@[email protected]
* igt@i915_selftest@live@active:
- {fi-ehl-1}: [INCOMPLETE][15] -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9229/fi-ehl-1/igt@i915_selftest@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18818/fi-ehl-1/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@execlists:
- fi-kbl-x1275: [INCOMPLETE][17] ([i915#794]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9229/fi-kbl-x1275/igt@i915_selftest@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18818/fi-kbl-x1275/igt@i915_selftest@[email protected]
* igt@kms_busy@basic@flip:
- {fi-kbl-7560u}: [DMESG-WARN][19] ([i915#1982]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9229/fi-kbl-7560u/igt@kms_busy@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18818/fi-kbl-7560u/igt@kms_busy@[email protected]
#### Warnings ####
* igt@i915_module_load@reload:
- fi-icl-u2: [DMESG-WARN][21] ([i915#289]) -> [DMESG-WARN][22] ([i915#1982] / [i915#289])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9229/fi-icl-u2/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18818/fi-icl-u2/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#146]: https://gitlab.freedesktop.org/drm/intel/issues/146
[i915#165]: https://gitlab.freedesktop.org/drm/intel/issues/165
[i915#198]: https://gitlab.freedesktop.org/drm/intel/issues/198
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#289]: https://gitlab.freedesktop.org/drm/intel/issues/289
[i915#794]: https://gitlab.freedesktop.org/drm/intel/issues/794
[k.org#205379]: https://bugzilla.kernel.org/show_bug.cgi?id=205379
Participating hosts (45 -> 40)
------------------------------
Missing (5): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_9229 -> Patchwork_18818
CI-20190529: 20190529
CI_DRM_9229: 4abde8e3625d7249799c3e1cdeac1b2aa3ad3edb @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5830: 12d370cb57e0cfcb781c87ad9e15e68b17a1f41f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_18818: cdbe2ba385edb0f652187e7c53224e3f23f2b4d0 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
cdbe2ba385ed drm/i915/gvt: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18818/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx