* [PATCH] drm/shmem-helper: Fix obj->filp derefence
@ 2020-06-15 15:10 ` Daniel Vetter
0 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2020-06-15 15:10 UTC (permalink / raw)
To: DRI Development
Cc: Daniel Vetter, Intel Graphics Development, Boris Brezillon,
Gerd Hoffmann, Thomas Zimmermann, Daniel Vetter
I broke that in my refactoring:
commit 7d2cd72a9aa3df3604cafd169a2d4a525afb68ca
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Fri May 29 16:05:42 2020 +0200
drm/shmem-helpers: Simplify dma-buf importing
Reported-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 7d2cd72a9aa3 ("drm/shmem-helpers: Simplify dma-buf importing")
Cc: Boris Brezillon <boris.brezillon@collabora.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c
index 0a7e3b664bc2..3e7ee407a17c 100644
--- a/drivers/gpu/drm/drm_gem_shmem_helper.c
+++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
@@ -70,15 +70,17 @@ __drm_gem_shmem_create(struct drm_device *dev, size_t size, bool private)
mutex_init(&shmem->vmap_lock);
INIT_LIST_HEAD(&shmem->madv_list);
- /*
- * Our buffers are kept pinned, so allocating them
- * from the MOVABLE zone is a really bad idea, and
- * conflicts with CMA. See comments above new_inode()
- * why this is required _and_ expected if you're
- * going to pin these pages.
- */
- mapping_set_gfp_mask(obj->filp->f_mapping, GFP_HIGHUSER |
- __GFP_RETRY_MAYFAIL | __GFP_NOWARN);
+ if (!private) {
+ /*
+ * Our buffers are kept pinned, so allocating them
+ * from the MOVABLE zone is a really bad idea, and
+ * conflicts with CMA. See comments above new_inode()
+ * why this is required _and_ expected if you're
+ * going to pin these pages.
+ */
+ mapping_set_gfp_mask(obj->filp->f_mapping, GFP_HIGHUSER |
+ __GFP_RETRY_MAYFAIL | __GFP_NOWARN);
+ }
return shmem;
--
2.27.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Intel-gfx] [PATCH] drm/shmem-helper: Fix obj->filp derefence
@ 2020-06-15 15:10 ` Daniel Vetter
0 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2020-06-15 15:10 UTC (permalink / raw)
To: DRI Development
Cc: Rob Herring, Noralf Trønnes, Daniel Vetter,
Intel Graphics Development, Gerd Hoffmann, Thomas Zimmermann,
Daniel Vetter
I broke that in my refactoring:
commit 7d2cd72a9aa3df3604cafd169a2d4a525afb68ca
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Fri May 29 16:05:42 2020 +0200
drm/shmem-helpers: Simplify dma-buf importing
Reported-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 7d2cd72a9aa3 ("drm/shmem-helpers: Simplify dma-buf importing")
Cc: Boris Brezillon <boris.brezillon@collabora.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
drivers/gpu/drm/drm_gem_shmem_helper.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c
index 0a7e3b664bc2..3e7ee407a17c 100644
--- a/drivers/gpu/drm/drm_gem_shmem_helper.c
+++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
@@ -70,15 +70,17 @@ __drm_gem_shmem_create(struct drm_device *dev, size_t size, bool private)
mutex_init(&shmem->vmap_lock);
INIT_LIST_HEAD(&shmem->madv_list);
- /*
- * Our buffers are kept pinned, so allocating them
- * from the MOVABLE zone is a really bad idea, and
- * conflicts with CMA. See comments above new_inode()
- * why this is required _and_ expected if you're
- * going to pin these pages.
- */
- mapping_set_gfp_mask(obj->filp->f_mapping, GFP_HIGHUSER |
- __GFP_RETRY_MAYFAIL | __GFP_NOWARN);
+ if (!private) {
+ /*
+ * Our buffers are kept pinned, so allocating them
+ * from the MOVABLE zone is a really bad idea, and
+ * conflicts with CMA. See comments above new_inode()
+ * why this is required _and_ expected if you're
+ * going to pin these pages.
+ */
+ mapping_set_gfp_mask(obj->filp->f_mapping, GFP_HIGHUSER |
+ __GFP_RETRY_MAYFAIL | __GFP_NOWARN);
+ }
return shmem;
--
2.27.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/shmem-helper: Fix obj->filp derefence
2020-06-15 15:10 ` [Intel-gfx] " Daniel Vetter
(?)
@ 2020-06-15 15:46 ` Patchwork
-1 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2020-06-15 15:46 UTC (permalink / raw)
To: Daniel Vetter; +Cc: intel-gfx
== Series Details ==
Series: drm/shmem-helper: Fix obj->filp derefence
URL : https://patchwork.freedesktop.org/series/78378/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
ce71e5b57288 drm/shmem-helper: Fix obj->filp derefence
-:11: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 7d2cd72a9aa3 ("drm/shmem-helpers: Simplify dma-buf importing")'
#11:
commit 7d2cd72a9aa3df3604cafd169a2d4a525afb68ca
-:56: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'
total: 1 errors, 1 warnings, 0 checks, 26 lines checked
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/shmem-helper: Fix obj->filp derefence
2020-06-15 15:10 ` [Intel-gfx] " Daniel Vetter
(?)
(?)
@ 2020-06-15 16:07 ` Patchwork
-1 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2020-06-15 16:07 UTC (permalink / raw)
To: Daniel Vetter; +Cc: intel-gfx
== Series Details ==
Series: drm/shmem-helper: Fix obj->filp derefence
URL : https://patchwork.freedesktop.org/series/78378/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8627 -> Patchwork_17952
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/index.html
Known issues
------------
Here are the changes found in Patchwork_17952 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_suspend@basic-s0:
- fi-tgl-u2: [PASS][1] -> [FAIL][2] ([i915#1888])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-tgl-u2/igt@gem_exec_suspend@basic-s0.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/fi-tgl-u2/igt@gem_exec_suspend@basic-s0.html
* igt@i915_module_load@reload:
- fi-tgl-u2: [PASS][3] -> [DMESG-WARN][4] ([i915#402])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-tgl-u2/igt@i915_module_load@reload.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/fi-tgl-u2/igt@i915_module_load@reload.html
* igt@i915_pm_backlight@basic-brightness:
- fi-whl-u: [PASS][5] -> [DMESG-WARN][6] ([i915#95])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-whl-u/igt@i915_pm_backlight@basic-brightness.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/fi-whl-u/igt@i915_pm_backlight@basic-brightness.html
* igt@vgem_basic@setversion:
- fi-tgl-y: [PASS][7] -> [DMESG-WARN][8] ([i915#402]) +1 similar issue
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-tgl-y/igt@vgem_basic@setversion.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/fi-tgl-y/igt@vgem_basic@setversion.html
#### Possible fixes ####
* igt@gem_flink_basic@flink-lifetime:
- fi-tgl-y: [DMESG-WARN][9] ([i915#402]) -> [PASS][10] +2 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-tgl-y/igt@gem_flink_basic@flink-lifetime.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/fi-tgl-y/igt@gem_flink_basic@flink-lifetime.html
* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-byt-j1900: [DMESG-WARN][11] ([i915#1982]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-byt-j1900/igt@i915_pm_rpm@basic-pci-d3-state.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/fi-byt-j1900/igt@i915_pm_rpm@basic-pci-d3-state.html
* igt@i915_pm_rpm@module-reload:
- fi-glk-dsi: [DMESG-WARN][13] ([i915#1982]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-glk-dsi/igt@i915_pm_rpm@module-reload.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/fi-glk-dsi/igt@i915_pm_rpm@module-reload.html
* igt@kms_busy@basic@modeset:
- {fi-tgl-dsi}: [DMESG-WARN][15] ([i915#1982]) -> [PASS][16] +1 similar issue
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-tgl-dsi/igt@kms_busy@basic@modeset.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/fi-tgl-dsi/igt@kms_busy@basic@modeset.html
* igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1:
- fi-icl-u2: [DMESG-WARN][17] ([i915#1982]) -> [PASS][18] +2 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-icl-u2/igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/fi-icl-u2/igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1.html
#### Warnings ####
* igt@i915_pm_rpm@module-reload:
- fi-kbl-x1275: [DMESG-FAIL][19] ([i915#62]) -> [SKIP][20] ([fdo#109271])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-kbl-x1275/igt@i915_pm_rpm@module-reload.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/fi-kbl-x1275/igt@i915_pm_rpm@module-reload.html
* igt@kms_cursor_legacy@basic-flip-before-cursor-atomic:
- fi-kbl-x1275: [DMESG-WARN][21] ([i915#62] / [i915#92]) -> [DMESG-WARN][22] ([i915#62] / [i915#92] / [i915#95]) +1 similar issue
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-kbl-x1275/igt@kms_cursor_legacy@basic-flip-before-cursor-atomic.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/fi-kbl-x1275/igt@kms_cursor_legacy@basic-flip-before-cursor-atomic.html
* igt@kms_force_connector_basic@force-edid:
- fi-kbl-x1275: [DMESG-WARN][23] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][24] ([i915#62] / [i915#92]) +3 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/fi-kbl-x1275/igt@kms_force_connector_basic@force-edid.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/fi-kbl-x1275/igt@kms_force_connector_basic@force-edid.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#1569]: https://gitlab.freedesktop.org/drm/intel/issues/1569
[i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
[i915#192]: https://gitlab.freedesktop.org/drm/intel/issues/192
[i915#193]: https://gitlab.freedesktop.org/drm/intel/issues/193
[i915#194]: https://gitlab.freedesktop.org/drm/intel/issues/194
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2029]: https://gitlab.freedesktop.org/drm/intel/issues/2029
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[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 (50 -> 44)
------------------------------
Additional (1): fi-gdg-551
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
-------------
* Linux: CI_DRM_8627 -> Patchwork_17952
CI-20190529: 20190529
CI_DRM_8627: 593c112156feb0f6159814f2276a32c90f243823 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5710: f524eee47930601ad7b4cba9d40c26d68dc7d250 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17952: ce71e5b572884577644db2f7a3f09760105ca1dd @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
ce71e5b57288 drm/shmem-helper: Fix obj->filp derefence
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Intel-gfx] ✓ Fi.CI.IGT: success for drm/shmem-helper: Fix obj->filp derefence
2020-06-15 15:10 ` [Intel-gfx] " Daniel Vetter
` (2 preceding siblings ...)
(?)
@ 2020-06-15 18:13 ` Patchwork
-1 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2020-06-15 18:13 UTC (permalink / raw)
To: Daniel Vetter; +Cc: intel-gfx
== Series Details ==
Series: drm/shmem-helper: Fix obj->filp derefence
URL : https://patchwork.freedesktop.org/series/78378/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8627_full -> Patchwork_17952_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_17952_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_eio@in-flight-suspend:
- shard-skl: [PASS][1] -> [INCOMPLETE][2] ([i915#69])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-skl10/igt@gem_eio@in-flight-suspend.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-skl10/igt@gem_eio@in-flight-suspend.html
* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [PASS][3] -> [FAIL][4] ([i915#454])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-iclb1/igt@i915_pm_dc@dc6-psr.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-iclb6/igt@i915_pm_dc@dc6-psr.html
* igt@kms_big_fb@y-tiled-64bpp-rotate-180:
- shard-glk: [PASS][5] -> [DMESG-FAIL][6] ([i915#118] / [i915#95])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-glk9/igt@kms_big_fb@y-tiled-64bpp-rotate-180.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-glk8/igt@kms_big_fb@y-tiled-64bpp-rotate-180.html
* igt@kms_cursor_crc@pipe-a-cursor-suspend:
- shard-kbl: [PASS][7] -> [DMESG-WARN][8] ([i915#180]) +5 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-kbl6/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-kbl4/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
* igt@kms_flip@plain-flip-fb-recreate-interruptible@c-edp1:
- shard-skl: [PASS][9] -> [FAIL][10] ([i915#1928])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-skl8/igt@kms_flip@plain-flip-fb-recreate-interruptible@c-edp1.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-skl4/igt@kms_flip@plain-flip-fb-recreate-interruptible@c-edp1.html
* igt@kms_flip_tiling@flip-to-y-tiled:
- shard-kbl: [PASS][11] -> [DMESG-WARN][12] ([i915#1982])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-kbl6/igt@kms_flip_tiling@flip-to-y-tiled.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-kbl4/igt@kms_flip_tiling@flip-to-y-tiled.html
* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-render:
- shard-tglb: [PASS][13] -> [DMESG-WARN][14] ([i915#402])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-tglb7/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-render.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-tglb1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-render.html
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-cpu:
- shard-tglb: [PASS][15] -> [DMESG-WARN][16] ([i915#1982]) +1 similar issue
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-tglb5/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-cpu.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-tglb8/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-cpu.html
* igt@kms_frontbuffer_tracking@psr-rgb101010-draw-pwrite:
- shard-skl: [PASS][17] -> [DMESG-WARN][18] ([i915#1982]) +8 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-skl9/igt@kms_frontbuffer_tracking@psr-rgb101010-draw-pwrite.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-skl6/igt@kms_frontbuffer_tracking@psr-rgb101010-draw-pwrite.html
* igt@kms_hdr@bpc-switch-dpms:
- shard-skl: [PASS][19] -> [FAIL][20] ([i915#1188])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-skl10/igt@kms_hdr@bpc-switch-dpms.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-skl7/igt@kms_hdr@bpc-switch-dpms.html
* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [PASS][21] -> [FAIL][22] ([fdo#108145] / [i915#265]) +1 similar issue
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-skl6/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-skl10/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html
* igt@kms_psr@psr2_cursor_render:
- shard-iclb: [PASS][23] -> [SKIP][24] ([fdo#109441]) +1 similar issue
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-iclb3/igt@kms_psr@psr2_cursor_render.html
* igt@kms_vblank@pipe-c-wait-busy-hang:
- shard-apl: [PASS][25] -> [DMESG-WARN][26] ([i915#95]) +22 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-apl8/igt@kms_vblank@pipe-c-wait-busy-hang.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-apl1/igt@kms_vblank@pipe-c-wait-busy-hang.html
* igt@perf_pmu@semaphore-busy@rcs0:
- shard-kbl: [PASS][27] -> [FAIL][28] ([i915#1820])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-kbl3/igt@perf_pmu@semaphore-busy@rcs0.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-kbl4/igt@perf_pmu@semaphore-busy@rcs0.html
#### Possible fixes ####
* igt@gem_exec_balancer@sliced:
- shard-tglb: [TIMEOUT][29] ([i915#1936]) -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-tglb6/igt@gem_exec_balancer@sliced.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-tglb5/igt@gem_exec_balancer@sliced.html
* igt@gem_exec_schedule@implicit-read-write@rcs0:
- shard-snb: [INCOMPLETE][31] ([i915#82]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-snb2/igt@gem_exec_schedule@implicit-read-write@rcs0.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-snb1/igt@gem_exec_schedule@implicit-read-write@rcs0.html
* {igt@kms_atomic_transition@plane-all-transition-nonblocking-fencing@edp-1-pipe-a}:
- shard-tglb: [DMESG-WARN][33] ([i915#1982]) -> [PASS][34] +1 similar issue
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-tglb1/igt@kms_atomic_transition@plane-all-transition-nonblocking-fencing@edp-1-pipe-a.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-tglb7/igt@kms_atomic_transition@plane-all-transition-nonblocking-fencing@edp-1-pipe-a.html
* igt@kms_big_fb@linear-64bpp-rotate-180:
- shard-apl: [DMESG-WARN][35] ([i915#1982]) -> [PASS][36] +2 similar issues
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-apl4/igt@kms_big_fb@linear-64bpp-rotate-180.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-apl7/igt@kms_big_fb@linear-64bpp-rotate-180.html
- shard-glk: [DMESG-FAIL][37] ([i915#118] / [i915#95]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-glk8/igt@kms_big_fb@linear-64bpp-rotate-180.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-glk1/igt@kms_big_fb@linear-64bpp-rotate-180.html
* igt@kms_cursor_legacy@long-nonblocking-modeset-vs-cursor-atomic:
- shard-apl: [DMESG-WARN][39] ([i915#95]) -> [PASS][40] +21 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-apl7/igt@kms_cursor_legacy@long-nonblocking-modeset-vs-cursor-atomic.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-apl2/igt@kms_cursor_legacy@long-nonblocking-modeset-vs-cursor-atomic.html
* igt@kms_flip@flip-vs-dpms-off-vs-modeset@a-edp1:
- shard-tglb: [DMESG-WARN][41] ([i915#402]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-tglb7/igt@kms_flip@flip-vs-dpms-off-vs-modeset@a-edp1.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-tglb1/igt@kms_flip@flip-vs-dpms-off-vs-modeset@a-edp1.html
* igt@kms_flip@flip-vs-panning-interruptible@a-edp1:
- shard-skl: [DMESG-WARN][43] ([i915#1982]) -> [PASS][44] +7 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-skl9/igt@kms_flip@flip-vs-panning-interruptible@a-edp1.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-skl6/igt@kms_flip@flip-vs-panning-interruptible@a-edp1.html
* igt@kms_flip@plain-flip-fb-recreate-interruptible@b-edp1:
- shard-skl: [FAIL][45] ([i915#1928]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-skl8/igt@kms_flip@plain-flip-fb-recreate-interruptible@b-edp1.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-skl4/igt@kms_flip@plain-flip-fb-recreate-interruptible@b-edp1.html
* igt@kms_plane_cursor@pipe-a-primary-size-256:
- shard-glk: [DMESG-WARN][47] ([i915#1982]) -> [PASS][48] +1 similar issue
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-glk9/igt@kms_plane_cursor@pipe-a-primary-size-256.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-glk5/igt@kms_plane_cursor@pipe-a-primary-size-256.html
* igt@kms_psr@no_drrs:
- shard-iclb: [FAIL][49] ([i915#173]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-iclb1/igt@kms_psr@no_drrs.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-iclb6/igt@kms_psr@no_drrs.html
* igt@kms_psr@psr2_sprite_mmap_cpu:
- shard-tglb: [TIMEOUT][51] -> [PASS][52] +1 similar issue
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-tglb6/igt@kms_psr@psr2_sprite_mmap_cpu.html
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-tglb5/igt@kms_psr@psr2_sprite_mmap_cpu.html
* igt@kms_psr@psr2_suspend:
- shard-iclb: [SKIP][53] ([fdo#109441]) -> [PASS][54] +3 similar issues
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-iclb4/igt@kms_psr@psr2_suspend.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-iclb2/igt@kms_psr@psr2_suspend.html
* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-kbl: [DMESG-WARN][55] ([i915#180]) -> [PASS][56] +2 similar issues
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-kbl1/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-kbl2/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
* igt@perf@blocking-parameterized:
- shard-iclb: [FAIL][57] ([i915#1542]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-iclb4/igt@perf@blocking-parameterized.html
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-iclb2/igt@perf@blocking-parameterized.html
#### Warnings ####
* igt@i915_pm_dc@dc3co-vpb-simulation:
- shard-iclb: [SKIP][59] ([i915#658]) -> [SKIP][60] ([i915#588])
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-iclb4/igt@i915_pm_dc@dc3co-vpb-simulation.html
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-iclb2/igt@i915_pm_dc@dc3co-vpb-simulation.html
* igt@i915_pm_dc@dc6-psr:
- shard-skl: [DMESG-FAIL][61] ([i915#1982]) -> [FAIL][62] ([i915#454])
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-skl5/igt@i915_pm_dc@dc6-psr.html
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-skl1/igt@i915_pm_dc@dc6-psr.html
* igt@kms_content_protection@atomic:
- shard-kbl: [TIMEOUT][63] ([i915#1319] / [i915#1958]) -> [TIMEOUT][64] ([i915#1319])
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-kbl4/igt@kms_content_protection@atomic.html
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-kbl3/igt@kms_content_protection@atomic.html
* igt@kms_content_protection@atomic-dpms:
- shard-kbl: [TIMEOUT][65] ([i915#1319]) -> [TIMEOUT][66] ([i915#1319] / [i915#1958])
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-kbl6/igt@kms_content_protection@atomic-dpms.html
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-kbl4/igt@kms_content_protection@atomic-dpms.html
* igt@kms_flip@flip-vs-suspend@a-dp1:
- shard-kbl: [DMESG-WARN][67] ([i915#180]) -> [INCOMPLETE][68] ([i915#155])
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-kbl6/igt@kms_flip@flip-vs-suspend@a-dp1.html
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-kbl2/igt@kms_flip@flip-vs-suspend@a-dp1.html
* igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-pri-indfb-draw-pwrite:
- shard-tglb: [TIMEOUT][69] -> [SKIP][70] ([fdo#111825])
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8627/shard-tglb6/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-pri-indfb-draw-pwrite.html
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/shard-tglb5/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-pri-indfb-draw-pwrite.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#155]: https://gitlab.freedesktop.org/drm/intel/issues/155
[i915#173]: https://gitlab.freedesktop.org/drm/intel/issues/173
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1820]: https://gitlab.freedesktop.org/drm/intel/issues/1820
[i915#1928]: https://gitlab.freedesktop.org/drm/intel/issues/1928
[i915#1936]: https://gitlab.freedesktop.org/drm/intel/issues/1936
[i915#1958]: https://gitlab.freedesktop.org/drm/intel/issues/1958
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[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#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (11 -> 11)
------------------------------
No changes in participating hosts
Build changes
-------------
* Linux: CI_DRM_8627 -> Patchwork_17952
CI-20190529: 20190529
CI_DRM_8627: 593c112156feb0f6159814f2276a32c90f243823 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5710: f524eee47930601ad7b4cba9d40c26d68dc7d250 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17952: ce71e5b572884577644db2f7a3f09760105ca1dd @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17952/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] drm/shmem-helper: Fix obj->filp derefence
2020-06-15 15:10 ` [Intel-gfx] " Daniel Vetter
@ 2020-06-16 11:24 ` Thomas Zimmermann
-1 siblings, 0 replies; 11+ messages in thread
From: Thomas Zimmermann @ 2020-06-16 11:24 UTC (permalink / raw)
To: Daniel Vetter, DRI Development
Cc: Intel Graphics Development, Boris Brezillon, Gerd Hoffmann,
Daniel Vetter
[-- Attachment #1.1.1: Type: text/plain, Size: 9933 bytes --]
Hi Daniel
Am 15.06.20 um 17:10 schrieb Daniel Vetter:
> I broke that in my refactoring:
>
> commit 7d2cd72a9aa3df3604cafd169a2d4a525afb68ca
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date: Fri May 29 16:05:42 2020 +0200
>
> drm/shmem-helpers: Simplify dma-buf importing
>
> Reported-by: Thomas Zimmermann <tzimmermann@suse.de>
> Fixes: 7d2cd72a9aa3 ("drm/shmem-helpers: Simplify dma-buf importing")
> Cc: Boris Brezillon <boris.brezillon@collabora.com>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Noralf Trønnes <noralf@tronnes.org>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
> drivers/gpu/drm/drm_gem_shmem_helper.c | 20 +++++++++++---------
> 1 file changed, 11 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c
> index 0a7e3b664bc2..3e7ee407a17c 100644
> --- a/drivers/gpu/drm/drm_gem_shmem_helper.c
> +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
> @@ -70,15 +70,17 @@ __drm_gem_shmem_create(struct drm_device *dev, size_t size, bool private)
> mutex_init(&shmem->vmap_lock);
> INIT_LIST_HEAD(&shmem->madv_list);
>
> - /*
> - * Our buffers are kept pinned, so allocating them
> - * from the MOVABLE zone is a really bad idea, and
> - * conflicts with CMA. See comments above new_inode()
> - * why this is required _and_ expected if you're
> - * going to pin these pages.
> - */
> - mapping_set_gfp_mask(obj->filp->f_mapping, GFP_HIGHUSER |
> - __GFP_RETRY_MAYFAIL | __GFP_NOWARN);
> + if (!private) {
> + /*
> + * Our buffers are kept pinned, so allocating them
> + * from the MOVABLE zone is a really bad idea, and
> + * conflicts with CMA. See comments above new_inode()
> + * why this is required _and_ expected if you're
> + * going to pin these pages.
> + */
> + mapping_set_gfp_mask(obj->filp->f_mapping, GFP_HIGHUSER |
> + __GFP_RETRY_MAYFAIL | __GFP_NOWARN);
> + }
This bug is gone, but now I see
[ 5.577857] ------------[ cut here ]------------
[ 5.577881] WARNING: CPU: 0 PID: 1 at drivers/gpu/drm/drm_gem.c:564
drm_gem_get_pages+0x190/0x1b0
[ 5.577883] Modules linked in:
[ 5.577891] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.7.0-1-pae+ #40
[ 5.577893] Hardware name: MSI MS-6380
/MS-6380 , BIOS 07.00T
[ 5.577897] EIP: drm_gem_get_pages+0x190/0x1b0
[ 5.577904] Code: b7 ff 8d 45 b0 e8 30 63 b7 ff e8 6b d8 38 00 eb 9d
8d b4 26 00 00 00 00 66 90 89 fb eb 97 8d 74 26 00 bb f4 ff ff ff eb 8c
90 <0f> 0b bb ea ff ff ff eb 82 8d b4 26 00 00 00 00 0f 0b e9 95 fe ff
[ 5.577907] EAX: f24c0c00 EBX: f24c0c00 ECX: f3ae1900 EDX: 00000000
[ 5.577909] ESI: 00000000 EDI: 00000000 EBP: f3941b50 ESP: f3941afc
[ 5.577912] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00010246
[ 5.577915] CR0: 80050033 CR2: b7f5c784 CR3: 1b6b8000 CR4: 000006f0
[ 5.577918] Call Trace:
[ 5.577938] ? _cond_resched+0x18/0x50
[ 5.577950] drm_gem_shmem_get_pages+0x52/0xa0
[ 5.577955] drm_gem_shmem_vmap+0xa1/0x160
[ 5.577963] skms_simple_display_pipe_update+0x68/0xb0
[ 5.577973] drm_simple_kms_plane_atomic_update+0x23/0x30
[ 5.577976] drm_atomic_helper_commit_planes+0xba/0x220
[ 5.577981] drm_atomic_helper_commit_tail+0x33/0x70
[ 5.577984] commit_tail+0xe7/0x120
[ 5.577988] drm_atomic_helper_commit+0x107/0x130
[ 5.577991] ? drm_atomic_helper_setup_commit+0x5a0/0x5a0
[ 5.577995] drm_atomic_commit+0x3a/0x50
[ 5.577999] drm_client_modeset_commit_atomic+0x1ae/0x1e0
[ 5.578004] drm_client_modeset_commit_locked+0x48/0x80
[ 5.578008] drm_client_modeset_commit+0x20/0x40
[ 5.578012] drm_fb_helper_restore_fbdev_mode_unlocked+0x44/0x90
[ 5.578015] drm_fb_helper_set_par+0x2e/0x40
[ 5.578025] fbcon_init+0x285/0x590
[ 5.578035] visual_init+0xb9/0x120
[ 5.578040] do_bind_con_driver.isra.0+0x18a/0x280
[ 5.578045] do_take_over_console+0x2c/0x40
[ 5.578049] do_fbcon_takeover+0x5f/0xd0
[ 5.578053] fbcon_fb_registered+0xb7/0xe0
[ 5.578057] do_register_framebuffer+0x1ae/0x2e0
[ 5.578062] register_framebuffer+0x1c/0x30
[ 5.578065] __drm_fb_helper_initial_config_and_unlock+0x96/0xd0
[ 5.578069] drm_fbdev_client_hotplug+0x136/0x220
[ 5.578072] drm_fbdev_generic_setup+0x9f/0x14a
[ 5.578076] ? skms_device_create.constprop.0+0x9f/0xb0
[ 5.578079] skms_probe+0x1b/0x20
[ 5.578083] platform_drv_probe+0x47/0x90
[ 5.578092] really_probe+0x2a9/0x3f0
[ 5.578096] driver_probe_device+0xa9/0xf0
[ 5.578100] ? _cond_resched+0x18/0x50
[ 5.578103] device_driver_attach+0x99/0xa0
[ 5.578107] __driver_attach+0x79/0x130
[ 5.578111] ? device_driver_attach+0xa0/0xa0
[ 5.578114] bus_for_each_dev+0x5b/0xa0
[ 5.578118] driver_attach+0x19/0x20
[ 5.578122] ? device_driver_attach+0xa0/0xa0
[ 5.578125] bus_add_driver+0x10d/0x1e0
[ 5.578130] driver_register+0x79/0xd0
[ 5.578137] ? mipi_dsi_bus_init+0x14/0x14
[ 5.578140] __platform_driver_register+0x2f/0x40
[ 5.578143] skms_platform_driver_init+0x14/0x16
[ 5.578150] do_one_initcall+0x42/0x1e0
[ 5.578158] ? rdinit_setup+0x2a/0x2a
[ 5.578161] ? rdinit_setup+0x2a/0x2a
[ 5.578166] do_initcalls+0xae/0xd1
[ 5.578170] kernel_init_freeable+0x108/0x14f
[ 5.578181] ? rest_init+0x9b/0x9b
[ 5.578185] kernel_init+0xd/0xe5
[ 5.578193] ret_from_fork+0x2e/0x38
[ 5.578201] ---[ end trace d857253095ede2e3 ]---
[ 5.578221] BUG: unable to handle page fault for address: ffffffea
[ 5.578223] #PF: supervisor read access in kernel mode
[ 5.578225] #PF: error_code(0x0000) - not-present page
[ 5.578227] *pdpt = 000000001b6b4001 *pde = 000000001bc91067 *pte =
0000000000000000
[ 5.578233] Oops: 0000 [#1] SMP NOPTI
[ 5.578237] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W
5.7.0-1-pae+ #40
[ 5.578239] Hardware name: MSI MS-6380
/MS-6380 , BIOS 07.00T
[ 5.578249] EIP: memcpy_toio+0x2b/0x60
[ 5.578252] Code: 8d 44 20 00 85 c9 74 47 55 89 e5 57 89 c7 56 89 d6
53 89 cb a8 01 75 3f 83 fb 01 76 08 f7 c7 02 00 00 00 75 1a 89 d9 c1 e9
02 <f3> a5 f6 c3 02 74 02 66 a5 f6 c3 01 74 01 a4 5b 5e 5f 5d c3 90 66
[ 5.578255] EAX: f7200000 EBX: 00001400 ECX: 00000500 EDX: ffffffea
[ 5.578257] ESI: ffffffea EDI: f7200000 EBP: f3941b3c ESP: f3941b30
[ 5.578260] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00010216
[ 5.578262] CR0: 80050033 CR2: ffffffea CR3: 1b6b8000 CR4: 000006f0
[ 5.578263] Call Trace:
[ 5.578271] drm_fb_memcpy_dstclip+0x6f/0x90
[ 5.578276] drm_fb_blit_rect_dstclip+0x8d/0xc0
[ 5.578280] skms_simple_display_pipe_update+0x8d/0xb0
[ 5.578285] drm_simple_kms_plane_atomic_update+0x23/0x30
[ 5.578288] drm_atomic_helper_commit_planes+0xba/0x220
[ 5.578292] drm_atomic_helper_commit_tail+0x33/0x70
[ 5.578295] commit_tail+0xe7/0x120
[ 5.578299] drm_atomic_helper_commit+0x107/0x130
[ 5.578303] ? drm_atomic_helper_setup_commit+0x5a0/0x5a0
[ 5.578306] drm_atomic_commit+0x3a/0x50
[ 5.578310] drm_client_modeset_commit_atomic+0x1ae/0x1e0
[ 5.578315] drm_client_modeset_commit_locked+0x48/0x80
[ 5.578318] drm_client_modeset_commit+0x20/0x40
[ 5.578322] drm_fb_helper_restore_fbdev_mode_unlocked+0x44/0x90
[ 5.578325] drm_fb_helper_set_par+0x2e/0x40
[ 5.578329] fbcon_init+0x285/0x590
[ 5.578333] visual_init+0xb9/0x120
[ 5.578338] do_bind_con_driver.isra.0+0x18a/0x280
[ 5.578342] do_take_over_console+0x2c/0x40
[ 5.578346] do_fbcon_takeover+0x5f/0xd0
[ 5.578350] fbcon_fb_registered+0xb7/0xe0
[ 5.578353] do_register_framebuffer+0x1ae/0x2e0
[ 5.578358] register_framebuffer+0x1c/0x30
[ 5.578361] __drm_fb_helper_initial_config_and_unlock+0x96/0xd0
[ 5.578364] drm_fbdev_client_hotplug+0x136/0x220
[ 5.578368] drm_fbdev_generic_setup+0x9f/0x14a
[ 5.578371] ? skms_device_create.constprop.0+0x9f/0xb0
[ 5.578374] skms_probe+0x1b/0x20
[ 5.578377] platform_drv_probe+0x47/0x90
[ 5.578381] really_probe+0x2a9/0x3f0
[ 5.578385] driver_probe_device+0xa9/0xf0
[ 5.578388] ? _cond_resched+0x18/0x50
[ 5.578392] device_driver_attach+0x99/0xa0
[ 5.578396] __driver_attach+0x79/0x130
[ 5.578400] ? device_driver_attach+0xa0/0xa0
[ 5.578403] bus_for_each_dev+0x5b/0xa0
[ 5.578407] driver_attach+0x19/0x20
[ 5.578411] ? device_driver_attach+0xa0/0xa0
[ 5.578414] bus_add_driver+0x10d/0x1e0
[ 5.578418] driver_register+0x79/0xd0
[ 5.578421] ? mipi_dsi_bus_init+0x14/0x14
[ 5.578424] __platform_driver_register+0x2f/0x40
[ 5.578428] skms_platform_driver_init+0x14/0x16
[ 5.578431] do_one_initcall+0x42/0x1e0
[ 5.578434] ? rdinit_setup+0x2a/0x2a
[ 5.578437] ? rdinit_setup+0x2a/0x2a
[ 5.578441] do_initcalls+0xae/0xd1
[ 5.578445] kernel_init_freeable+0x108/0x14f
[ 5.578449] ? rest_init+0x9b/0x9b
[ 5.578453] kernel_init+0xd/0xe5
[ 5.578457] ret_from_fork+0x2e/0x38
[ 5.578459] Modules linked in:
[ 5.578463] CR2: 00000000ffffffea
[ 5.578472] ---[ end trace d857253095ede2e4 ]---
because drm_gem_get_pages() needs obj->filp.
All this happens for dumb buffers. Why is a dumb buffer set up with
(private == true) ? It has an associated file.
Best regards
Thomas
>
> return shmem;
>
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/shmem-helper: Fix obj->filp derefence
@ 2020-06-16 11:24 ` Thomas Zimmermann
0 siblings, 0 replies; 11+ messages in thread
From: Thomas Zimmermann @ 2020-06-16 11:24 UTC (permalink / raw)
To: Daniel Vetter, DRI Development
Cc: Rob Herring, Noralf Trønnes, Intel Graphics Development,
Gerd Hoffmann, Daniel Vetter
[-- Attachment #1.1.1: Type: text/plain, Size: 9933 bytes --]
Hi Daniel
Am 15.06.20 um 17:10 schrieb Daniel Vetter:
> I broke that in my refactoring:
>
> commit 7d2cd72a9aa3df3604cafd169a2d4a525afb68ca
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date: Fri May 29 16:05:42 2020 +0200
>
> drm/shmem-helpers: Simplify dma-buf importing
>
> Reported-by: Thomas Zimmermann <tzimmermann@suse.de>
> Fixes: 7d2cd72a9aa3 ("drm/shmem-helpers: Simplify dma-buf importing")
> Cc: Boris Brezillon <boris.brezillon@collabora.com>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Noralf Trønnes <noralf@tronnes.org>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
> drivers/gpu/drm/drm_gem_shmem_helper.c | 20 +++++++++++---------
> 1 file changed, 11 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c
> index 0a7e3b664bc2..3e7ee407a17c 100644
> --- a/drivers/gpu/drm/drm_gem_shmem_helper.c
> +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
> @@ -70,15 +70,17 @@ __drm_gem_shmem_create(struct drm_device *dev, size_t size, bool private)
> mutex_init(&shmem->vmap_lock);
> INIT_LIST_HEAD(&shmem->madv_list);
>
> - /*
> - * Our buffers are kept pinned, so allocating them
> - * from the MOVABLE zone is a really bad idea, and
> - * conflicts with CMA. See comments above new_inode()
> - * why this is required _and_ expected if you're
> - * going to pin these pages.
> - */
> - mapping_set_gfp_mask(obj->filp->f_mapping, GFP_HIGHUSER |
> - __GFP_RETRY_MAYFAIL | __GFP_NOWARN);
> + if (!private) {
> + /*
> + * Our buffers are kept pinned, so allocating them
> + * from the MOVABLE zone is a really bad idea, and
> + * conflicts with CMA. See comments above new_inode()
> + * why this is required _and_ expected if you're
> + * going to pin these pages.
> + */
> + mapping_set_gfp_mask(obj->filp->f_mapping, GFP_HIGHUSER |
> + __GFP_RETRY_MAYFAIL | __GFP_NOWARN);
> + }
This bug is gone, but now I see
[ 5.577857] ------------[ cut here ]------------
[ 5.577881] WARNING: CPU: 0 PID: 1 at drivers/gpu/drm/drm_gem.c:564
drm_gem_get_pages+0x190/0x1b0
[ 5.577883] Modules linked in:
[ 5.577891] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.7.0-1-pae+ #40
[ 5.577893] Hardware name: MSI MS-6380
/MS-6380 , BIOS 07.00T
[ 5.577897] EIP: drm_gem_get_pages+0x190/0x1b0
[ 5.577904] Code: b7 ff 8d 45 b0 e8 30 63 b7 ff e8 6b d8 38 00 eb 9d
8d b4 26 00 00 00 00 66 90 89 fb eb 97 8d 74 26 00 bb f4 ff ff ff eb 8c
90 <0f> 0b bb ea ff ff ff eb 82 8d b4 26 00 00 00 00 0f 0b e9 95 fe ff
[ 5.577907] EAX: f24c0c00 EBX: f24c0c00 ECX: f3ae1900 EDX: 00000000
[ 5.577909] ESI: 00000000 EDI: 00000000 EBP: f3941b50 ESP: f3941afc
[ 5.577912] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00010246
[ 5.577915] CR0: 80050033 CR2: b7f5c784 CR3: 1b6b8000 CR4: 000006f0
[ 5.577918] Call Trace:
[ 5.577938] ? _cond_resched+0x18/0x50
[ 5.577950] drm_gem_shmem_get_pages+0x52/0xa0
[ 5.577955] drm_gem_shmem_vmap+0xa1/0x160
[ 5.577963] skms_simple_display_pipe_update+0x68/0xb0
[ 5.577973] drm_simple_kms_plane_atomic_update+0x23/0x30
[ 5.577976] drm_atomic_helper_commit_planes+0xba/0x220
[ 5.577981] drm_atomic_helper_commit_tail+0x33/0x70
[ 5.577984] commit_tail+0xe7/0x120
[ 5.577988] drm_atomic_helper_commit+0x107/0x130
[ 5.577991] ? drm_atomic_helper_setup_commit+0x5a0/0x5a0
[ 5.577995] drm_atomic_commit+0x3a/0x50
[ 5.577999] drm_client_modeset_commit_atomic+0x1ae/0x1e0
[ 5.578004] drm_client_modeset_commit_locked+0x48/0x80
[ 5.578008] drm_client_modeset_commit+0x20/0x40
[ 5.578012] drm_fb_helper_restore_fbdev_mode_unlocked+0x44/0x90
[ 5.578015] drm_fb_helper_set_par+0x2e/0x40
[ 5.578025] fbcon_init+0x285/0x590
[ 5.578035] visual_init+0xb9/0x120
[ 5.578040] do_bind_con_driver.isra.0+0x18a/0x280
[ 5.578045] do_take_over_console+0x2c/0x40
[ 5.578049] do_fbcon_takeover+0x5f/0xd0
[ 5.578053] fbcon_fb_registered+0xb7/0xe0
[ 5.578057] do_register_framebuffer+0x1ae/0x2e0
[ 5.578062] register_framebuffer+0x1c/0x30
[ 5.578065] __drm_fb_helper_initial_config_and_unlock+0x96/0xd0
[ 5.578069] drm_fbdev_client_hotplug+0x136/0x220
[ 5.578072] drm_fbdev_generic_setup+0x9f/0x14a
[ 5.578076] ? skms_device_create.constprop.0+0x9f/0xb0
[ 5.578079] skms_probe+0x1b/0x20
[ 5.578083] platform_drv_probe+0x47/0x90
[ 5.578092] really_probe+0x2a9/0x3f0
[ 5.578096] driver_probe_device+0xa9/0xf0
[ 5.578100] ? _cond_resched+0x18/0x50
[ 5.578103] device_driver_attach+0x99/0xa0
[ 5.578107] __driver_attach+0x79/0x130
[ 5.578111] ? device_driver_attach+0xa0/0xa0
[ 5.578114] bus_for_each_dev+0x5b/0xa0
[ 5.578118] driver_attach+0x19/0x20
[ 5.578122] ? device_driver_attach+0xa0/0xa0
[ 5.578125] bus_add_driver+0x10d/0x1e0
[ 5.578130] driver_register+0x79/0xd0
[ 5.578137] ? mipi_dsi_bus_init+0x14/0x14
[ 5.578140] __platform_driver_register+0x2f/0x40
[ 5.578143] skms_platform_driver_init+0x14/0x16
[ 5.578150] do_one_initcall+0x42/0x1e0
[ 5.578158] ? rdinit_setup+0x2a/0x2a
[ 5.578161] ? rdinit_setup+0x2a/0x2a
[ 5.578166] do_initcalls+0xae/0xd1
[ 5.578170] kernel_init_freeable+0x108/0x14f
[ 5.578181] ? rest_init+0x9b/0x9b
[ 5.578185] kernel_init+0xd/0xe5
[ 5.578193] ret_from_fork+0x2e/0x38
[ 5.578201] ---[ end trace d857253095ede2e3 ]---
[ 5.578221] BUG: unable to handle page fault for address: ffffffea
[ 5.578223] #PF: supervisor read access in kernel mode
[ 5.578225] #PF: error_code(0x0000) - not-present page
[ 5.578227] *pdpt = 000000001b6b4001 *pde = 000000001bc91067 *pte =
0000000000000000
[ 5.578233] Oops: 0000 [#1] SMP NOPTI
[ 5.578237] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W
5.7.0-1-pae+ #40
[ 5.578239] Hardware name: MSI MS-6380
/MS-6380 , BIOS 07.00T
[ 5.578249] EIP: memcpy_toio+0x2b/0x60
[ 5.578252] Code: 8d 44 20 00 85 c9 74 47 55 89 e5 57 89 c7 56 89 d6
53 89 cb a8 01 75 3f 83 fb 01 76 08 f7 c7 02 00 00 00 75 1a 89 d9 c1 e9
02 <f3> a5 f6 c3 02 74 02 66 a5 f6 c3 01 74 01 a4 5b 5e 5f 5d c3 90 66
[ 5.578255] EAX: f7200000 EBX: 00001400 ECX: 00000500 EDX: ffffffea
[ 5.578257] ESI: ffffffea EDI: f7200000 EBP: f3941b3c ESP: f3941b30
[ 5.578260] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00010216
[ 5.578262] CR0: 80050033 CR2: ffffffea CR3: 1b6b8000 CR4: 000006f0
[ 5.578263] Call Trace:
[ 5.578271] drm_fb_memcpy_dstclip+0x6f/0x90
[ 5.578276] drm_fb_blit_rect_dstclip+0x8d/0xc0
[ 5.578280] skms_simple_display_pipe_update+0x8d/0xb0
[ 5.578285] drm_simple_kms_plane_atomic_update+0x23/0x30
[ 5.578288] drm_atomic_helper_commit_planes+0xba/0x220
[ 5.578292] drm_atomic_helper_commit_tail+0x33/0x70
[ 5.578295] commit_tail+0xe7/0x120
[ 5.578299] drm_atomic_helper_commit+0x107/0x130
[ 5.578303] ? drm_atomic_helper_setup_commit+0x5a0/0x5a0
[ 5.578306] drm_atomic_commit+0x3a/0x50
[ 5.578310] drm_client_modeset_commit_atomic+0x1ae/0x1e0
[ 5.578315] drm_client_modeset_commit_locked+0x48/0x80
[ 5.578318] drm_client_modeset_commit+0x20/0x40
[ 5.578322] drm_fb_helper_restore_fbdev_mode_unlocked+0x44/0x90
[ 5.578325] drm_fb_helper_set_par+0x2e/0x40
[ 5.578329] fbcon_init+0x285/0x590
[ 5.578333] visual_init+0xb9/0x120
[ 5.578338] do_bind_con_driver.isra.0+0x18a/0x280
[ 5.578342] do_take_over_console+0x2c/0x40
[ 5.578346] do_fbcon_takeover+0x5f/0xd0
[ 5.578350] fbcon_fb_registered+0xb7/0xe0
[ 5.578353] do_register_framebuffer+0x1ae/0x2e0
[ 5.578358] register_framebuffer+0x1c/0x30
[ 5.578361] __drm_fb_helper_initial_config_and_unlock+0x96/0xd0
[ 5.578364] drm_fbdev_client_hotplug+0x136/0x220
[ 5.578368] drm_fbdev_generic_setup+0x9f/0x14a
[ 5.578371] ? skms_device_create.constprop.0+0x9f/0xb0
[ 5.578374] skms_probe+0x1b/0x20
[ 5.578377] platform_drv_probe+0x47/0x90
[ 5.578381] really_probe+0x2a9/0x3f0
[ 5.578385] driver_probe_device+0xa9/0xf0
[ 5.578388] ? _cond_resched+0x18/0x50
[ 5.578392] device_driver_attach+0x99/0xa0
[ 5.578396] __driver_attach+0x79/0x130
[ 5.578400] ? device_driver_attach+0xa0/0xa0
[ 5.578403] bus_for_each_dev+0x5b/0xa0
[ 5.578407] driver_attach+0x19/0x20
[ 5.578411] ? device_driver_attach+0xa0/0xa0
[ 5.578414] bus_add_driver+0x10d/0x1e0
[ 5.578418] driver_register+0x79/0xd0
[ 5.578421] ? mipi_dsi_bus_init+0x14/0x14
[ 5.578424] __platform_driver_register+0x2f/0x40
[ 5.578428] skms_platform_driver_init+0x14/0x16
[ 5.578431] do_one_initcall+0x42/0x1e0
[ 5.578434] ? rdinit_setup+0x2a/0x2a
[ 5.578437] ? rdinit_setup+0x2a/0x2a
[ 5.578441] do_initcalls+0xae/0xd1
[ 5.578445] kernel_init_freeable+0x108/0x14f
[ 5.578449] ? rest_init+0x9b/0x9b
[ 5.578453] kernel_init+0xd/0xe5
[ 5.578457] ret_from_fork+0x2e/0x38
[ 5.578459] Modules linked in:
[ 5.578463] CR2: 00000000ffffffea
[ 5.578472] ---[ end trace d857253095ede2e4 ]---
because drm_gem_get_pages() needs obj->filp.
All this happens for dumb buffers. Why is a dumb buffer set up with
(private == true) ? It has an associated file.
Best regards
Thomas
>
> return shmem;
>
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] drm/shmem-helper: Fix obj->filp derefence
2020-06-15 15:10 ` [Intel-gfx] " Daniel Vetter
@ 2020-06-16 12:10 ` Thomas Zimmermann
-1 siblings, 0 replies; 11+ messages in thread
From: Thomas Zimmermann @ 2020-06-16 12:10 UTC (permalink / raw)
To: Daniel Vetter, DRI Development
Cc: Daniel Vetter, Intel Graphics Development, Boris Brezillon,
Gerd Hoffmann
[-- Attachment #1.1.1: Type: text/plain, Size: 2565 bytes --]
Hi,
as discussed on IRC, we still need this patch.
Am 15.06.20 um 17:10 schrieb Daniel Vetter:
> I broke that in my refactoring:
>
> commit 7d2cd72a9aa3df3604cafd169a2d4a525afb68ca
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date: Fri May 29 16:05:42 2020 +0200
>
> drm/shmem-helpers: Simplify dma-buf importing
>
> Reported-by: Thomas Zimmermann <tzimmermann@suse.de>
> Fixes: 7d2cd72a9aa3 ("drm/shmem-helpers: Simplify dma-buf importing")
> Cc: Boris Brezillon <boris.brezillon@collabora.com>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Noralf Trønnes <noralf@tronnes.org>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
> drivers/gpu/drm/drm_gem_shmem_helper.c | 20 +++++++++++---------
> 1 file changed, 11 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c
> index 0a7e3b664bc2..3e7ee407a17c 100644
> --- a/drivers/gpu/drm/drm_gem_shmem_helper.c
> +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
> @@ -70,15 +70,17 @@ __drm_gem_shmem_create(struct drm_device *dev, size_t size, bool private)
> mutex_init(&shmem->vmap_lock);
> INIT_LIST_HEAD(&shmem->madv_list);
>
> - /*
> - * Our buffers are kept pinned, so allocating them
> - * from the MOVABLE zone is a really bad idea, and
> - * conflicts with CMA. See comments above new_inode()
> - * why this is required _and_ expected if you're
> - * going to pin these pages.
> - */
> - mapping_set_gfp_mask(obj->filp->f_mapping, GFP_HIGHUSER |
> - __GFP_RETRY_MAYFAIL | __GFP_NOWARN);
> + if (!private) {
I would test for (obj->filp) here, because it's what the branch depends
on. Your choice. In any case
Tested-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
> + /*
> + * Our buffers are kept pinned, so allocating them
> + * from the MOVABLE zone is a really bad idea, and
> + * conflicts with CMA. See comments above new_inode()
> + * why this is required _and_ expected if you're
> + * going to pin these pages.
> + */
> + mapping_set_gfp_mask(obj->filp->f_mapping, GFP_HIGHUSER |
> + __GFP_RETRY_MAYFAIL | __GFP_NOWARN);
> + }
>
> return shmem;
>
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/shmem-helper: Fix obj->filp derefence
@ 2020-06-16 12:10 ` Thomas Zimmermann
0 siblings, 0 replies; 11+ messages in thread
From: Thomas Zimmermann @ 2020-06-16 12:10 UTC (permalink / raw)
To: Daniel Vetter, DRI Development
Cc: Daniel Vetter, Intel Graphics Development, Gerd Hoffmann
[-- Attachment #1.1.1: Type: text/plain, Size: 2565 bytes --]
Hi,
as discussed on IRC, we still need this patch.
Am 15.06.20 um 17:10 schrieb Daniel Vetter:
> I broke that in my refactoring:
>
> commit 7d2cd72a9aa3df3604cafd169a2d4a525afb68ca
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date: Fri May 29 16:05:42 2020 +0200
>
> drm/shmem-helpers: Simplify dma-buf importing
>
> Reported-by: Thomas Zimmermann <tzimmermann@suse.de>
> Fixes: 7d2cd72a9aa3 ("drm/shmem-helpers: Simplify dma-buf importing")
> Cc: Boris Brezillon <boris.brezillon@collabora.com>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Noralf Trønnes <noralf@tronnes.org>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
> drivers/gpu/drm/drm_gem_shmem_helper.c | 20 +++++++++++---------
> 1 file changed, 11 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c
> index 0a7e3b664bc2..3e7ee407a17c 100644
> --- a/drivers/gpu/drm/drm_gem_shmem_helper.c
> +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
> @@ -70,15 +70,17 @@ __drm_gem_shmem_create(struct drm_device *dev, size_t size, bool private)
> mutex_init(&shmem->vmap_lock);
> INIT_LIST_HEAD(&shmem->madv_list);
>
> - /*
> - * Our buffers are kept pinned, so allocating them
> - * from the MOVABLE zone is a really bad idea, and
> - * conflicts with CMA. See comments above new_inode()
> - * why this is required _and_ expected if you're
> - * going to pin these pages.
> - */
> - mapping_set_gfp_mask(obj->filp->f_mapping, GFP_HIGHUSER |
> - __GFP_RETRY_MAYFAIL | __GFP_NOWARN);
> + if (!private) {
I would test for (obj->filp) here, because it's what the branch depends
on. Your choice. In any case
Tested-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
> + /*
> + * Our buffers are kept pinned, so allocating them
> + * from the MOVABLE zone is a really bad idea, and
> + * conflicts with CMA. See comments above new_inode()
> + * why this is required _and_ expected if you're
> + * going to pin these pages.
> + */
> + mapping_set_gfp_mask(obj->filp->f_mapping, GFP_HIGHUSER |
> + __GFP_RETRY_MAYFAIL | __GFP_NOWARN);
> + }
>
> return shmem;
>
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] drm/shmem-helper: Fix obj->filp derefence
2020-06-16 12:10 ` [Intel-gfx] " Thomas Zimmermann
@ 2020-06-16 17:10 ` Daniel Vetter
-1 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2020-06-16 17:10 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: Daniel Vetter, Intel Graphics Development, DRI Development,
Boris Brezillon, Gerd Hoffmann, Daniel Vetter
On Tue, Jun 16, 2020 at 02:10:10PM +0200, Thomas Zimmermann wrote:
> Hi,
>
> as discussed on IRC, we still need this patch.
>
> Am 15.06.20 um 17:10 schrieb Daniel Vetter:
> > I broke that in my refactoring:
> >
> > commit 7d2cd72a9aa3df3604cafd169a2d4a525afb68ca
> > Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Date: Fri May 29 16:05:42 2020 +0200
> >
> > drm/shmem-helpers: Simplify dma-buf importing
> >
> > Reported-by: Thomas Zimmermann <tzimmermann@suse.de>
> > Fixes: 7d2cd72a9aa3 ("drm/shmem-helpers: Simplify dma-buf importing")
> > Cc: Boris Brezillon <boris.brezillon@collabora.com>
> > Cc: Thomas Zimmermann <tzimmermann@suse.de>
> > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > Cc: Rob Herring <robh@kernel.org>
> > Cc: Noralf Trønnes <noralf@tronnes.org>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> > drivers/gpu/drm/drm_gem_shmem_helper.c | 20 +++++++++++---------
> > 1 file changed, 11 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c
> > index 0a7e3b664bc2..3e7ee407a17c 100644
> > --- a/drivers/gpu/drm/drm_gem_shmem_helper.c
> > +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
> > @@ -70,15 +70,17 @@ __drm_gem_shmem_create(struct drm_device *dev, size_t size, bool private)
> > mutex_init(&shmem->vmap_lock);
> > INIT_LIST_HEAD(&shmem->madv_list);
> >
> > - /*
> > - * Our buffers are kept pinned, so allocating them
> > - * from the MOVABLE zone is a really bad idea, and
> > - * conflicts with CMA. See comments above new_inode()
> > - * why this is required _and_ expected if you're
> > - * going to pin these pages.
> > - */
> > - mapping_set_gfp_mask(obj->filp->f_mapping, GFP_HIGHUSER |
> > - __GFP_RETRY_MAYFAIL | __GFP_NOWARN);
> > + if (!private) {
>
> I would test for (obj->filp) here, because it's what the branch depends
> on. Your choice. In any case
I was pondering this too, on one hand it's the thing we're using, otoh
it's a direct consequence of the private flag, and the private flag has a
bit the clearer control flow I think - the obj->filp is clear that it's a
NULL check, but it's a lot less clear _why_ it is ok to have obj->filp ==
NULL. Checking for private makes this a bit clearer imo.
But yeah I considered both options. Maybe we should improve the comment in
a follow-up patch? I want to land the bugfix meanwhile, to close the
regression.
> Tested-by: Thomas Zimmermann <tzimmermann@suse.de>
> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Thanks for testing and reviewing!
-Daniel
>
>
> > + /*
> > + * Our buffers are kept pinned, so allocating them
> > + * from the MOVABLE zone is a really bad idea, and
> > + * conflicts with CMA. See comments above new_inode()
> > + * why this is required _and_ expected if you're
> > + * going to pin these pages.
> > + */
> > + mapping_set_gfp_mask(obj->filp->f_mapping, GFP_HIGHUSER |
> > + __GFP_RETRY_MAYFAIL | __GFP_NOWARN);
> > + }
> >
> > return shmem;
> >
> >
>
> --
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Maxfeldstr. 5, 90409 Nürnberg, Germany
> (HRB 36809, AG Nürnberg)
> Geschäftsführer: Felix Imendörffer
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/shmem-helper: Fix obj->filp derefence
@ 2020-06-16 17:10 ` Daniel Vetter
0 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2020-06-16 17:10 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: Daniel Vetter, Intel Graphics Development, DRI Development,
Gerd Hoffmann, Daniel Vetter
On Tue, Jun 16, 2020 at 02:10:10PM +0200, Thomas Zimmermann wrote:
> Hi,
>
> as discussed on IRC, we still need this patch.
>
> Am 15.06.20 um 17:10 schrieb Daniel Vetter:
> > I broke that in my refactoring:
> >
> > commit 7d2cd72a9aa3df3604cafd169a2d4a525afb68ca
> > Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Date: Fri May 29 16:05:42 2020 +0200
> >
> > drm/shmem-helpers: Simplify dma-buf importing
> >
> > Reported-by: Thomas Zimmermann <tzimmermann@suse.de>
> > Fixes: 7d2cd72a9aa3 ("drm/shmem-helpers: Simplify dma-buf importing")
> > Cc: Boris Brezillon <boris.brezillon@collabora.com>
> > Cc: Thomas Zimmermann <tzimmermann@suse.de>
> > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > Cc: Rob Herring <robh@kernel.org>
> > Cc: Noralf Trønnes <noralf@tronnes.org>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> > drivers/gpu/drm/drm_gem_shmem_helper.c | 20 +++++++++++---------
> > 1 file changed, 11 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c
> > index 0a7e3b664bc2..3e7ee407a17c 100644
> > --- a/drivers/gpu/drm/drm_gem_shmem_helper.c
> > +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c
> > @@ -70,15 +70,17 @@ __drm_gem_shmem_create(struct drm_device *dev, size_t size, bool private)
> > mutex_init(&shmem->vmap_lock);
> > INIT_LIST_HEAD(&shmem->madv_list);
> >
> > - /*
> > - * Our buffers are kept pinned, so allocating them
> > - * from the MOVABLE zone is a really bad idea, and
> > - * conflicts with CMA. See comments above new_inode()
> > - * why this is required _and_ expected if you're
> > - * going to pin these pages.
> > - */
> > - mapping_set_gfp_mask(obj->filp->f_mapping, GFP_HIGHUSER |
> > - __GFP_RETRY_MAYFAIL | __GFP_NOWARN);
> > + if (!private) {
>
> I would test for (obj->filp) here, because it's what the branch depends
> on. Your choice. In any case
I was pondering this too, on one hand it's the thing we're using, otoh
it's a direct consequence of the private flag, and the private flag has a
bit the clearer control flow I think - the obj->filp is clear that it's a
NULL check, but it's a lot less clear _why_ it is ok to have obj->filp ==
NULL. Checking for private makes this a bit clearer imo.
But yeah I considered both options. Maybe we should improve the comment in
a follow-up patch? I want to land the bugfix meanwhile, to close the
regression.
> Tested-by: Thomas Zimmermann <tzimmermann@suse.de>
> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Thanks for testing and reviewing!
-Daniel
>
>
> > + /*
> > + * Our buffers are kept pinned, so allocating them
> > + * from the MOVABLE zone is a really bad idea, and
> > + * conflicts with CMA. See comments above new_inode()
> > + * why this is required _and_ expected if you're
> > + * going to pin these pages.
> > + */
> > + mapping_set_gfp_mask(obj->filp->f_mapping, GFP_HIGHUSER |
> > + __GFP_RETRY_MAYFAIL | __GFP_NOWARN);
> > + }
> >
> > return shmem;
> >
> >
>
> --
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Maxfeldstr. 5, 90409 Nürnberg, Germany
> (HRB 36809, AG Nürnberg)
> Geschäftsführer: Felix Imendörffer
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2020-06-16 17:10 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-15 15:10 [PATCH] drm/shmem-helper: Fix obj->filp derefence Daniel Vetter
2020-06-15 15:10 ` [Intel-gfx] " Daniel Vetter
2020-06-15 15:46 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2020-06-15 16:07 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-06-15 18:13 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-06-16 11:24 ` [PATCH] " Thomas Zimmermann
2020-06-16 11:24 ` [Intel-gfx] " Thomas Zimmermann
2020-06-16 12:10 ` Thomas Zimmermann
2020-06-16 12:10 ` [Intel-gfx] " Thomas Zimmermann
2020-06-16 17:10 ` Daniel Vetter
2020-06-16 17:10 ` [Intel-gfx] " Daniel Vetter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.