Skip to contentSkip to conversation

mm: Use local variable for swap address space

PATCH In review Stuart Summers 3 participants 5 messages Jun 19, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: Use local variable for swap address space

This addresses the following build error:
mm/huge_memory.c: In function ‘__split_huge_page’:
mm/huge_memory.c:2506:41: warning: dereferencing ‘void *’ pointer

    __xa_store(&swap_address_space(entry)->i_pages,
                                         ^~

mm/huge_memory.c:2506:41: error: request for member ‘i_pages’ in something not a structure or union

---
 mm/huge_memory.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
mm/huge_memory.c +3 -1
index affb2c3667f9..bced5485137b 100644
@@ -2503,7 +2503,9 @@ static void __split_huge_page(struct page *page, struct list_head *list,
 					head + i, 0);
 		} else if (PageSwapCache(page)) {
 			swp_entry_t entry = { .val = page_private(head + i) };
-			__xa_store(&swap_address_space(entry)->i_pages,
+			struct address_space *address_space =
+				swap_address_space(entry);
+			__xa_store(&address_space->i_pages,
 				   swp_offset(entry),
 				   head + i, 0);
 		}
Signature · 6 lines
2.21.0.5.gaeb582a983

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

✗ Fi.CI.BAT: failure for mm: Use local variable for swap address space

== Series Details ==

== Series Details ==

Series: mm: Use local variable for swap address space
URL : https://patchwork.freedesktop.org/series/62358/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_6299 -> Patchwork_13339
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes introduced in Patchwork_13339, 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_13339/

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

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

### IGT changes ###

#### Possible regressions ####

* igt@gem_sync@basic-store-each:
- fi-skl-gvtdvm: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6299/fi-skl-gvtdvm/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13339/fi-skl-gvtdvm/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_basic@bad-close:
- fi-icl-dsi: [PASS][3] -> [INCOMPLETE][4] ([fdo#107713])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6299/fi-icl-dsi/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13339/fi-icl-dsi/igt@[email protected]

* igt@gem_ctx_switch@basic-default:
- fi-icl-guc: [PASS][5] -> [INCOMPLETE][6] ([fdo#107713] / [fdo#108569])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6299/fi-icl-guc/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13339/fi-icl-guc/igt@[email protected]

* igt@gem_exec_reloc@basic-gtt-noreloc:
- fi-icl-u3: [PASS][7] -> [DMESG-WARN][8] ([fdo#107724])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6299/fi-icl-u3/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13339/fi-icl-u3/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [PASS][9] -> [FAIL][10] ([fdo#109485])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6299/fi-kbl-7500u/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13339/fi-kbl-7500u/igt@[email protected]

#### Possible fixes ####

* igt@gem_sync@basic-store-each:
- fi-kbl-7567u: [FAIL][11] -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6299/fi-kbl-7567u/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13339/fi-kbl-7567u/igt@[email protected]

* igt@i915_module_load@reload:
- fi-blb-e6850: [INCOMPLETE][13] ([fdo#107718]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6299/fi-blb-e6850/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13339/fi-blb-e6850/igt@[email protected]

* igt@i915_pm_rpm@module-reload:
- fi-skl-6770hq: [FAIL][15] ([fdo#108511]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6299/fi-skl-6770hq/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13339/fi-skl-6770hq/igt@[email protected]

* igt@i915_selftest@live_contexts:
- fi-skl-gvtdvm: [DMESG-FAIL][17] ([fdo#110235]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6299/fi-skl-gvtdvm/igt@i915_selftest@live_contexts.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13339/fi-skl-gvtdvm/igt@i915_selftest@live_contexts.html
- fi-bdw-gvtdvm: [DMESG-FAIL][19] ([fdo#110235]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6299/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13339/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html

* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [DMESG-WARN][21] ([fdo#102614]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6299/fi-hsw-peppy/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13339/fi-hsw-peppy/igt@[email protected]
- fi-icl-u2: [FAIL][23] ([fdo#103167]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6299/fi-icl-u2/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13339/fi-icl-u2/igt@[email protected]

[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#108511]: https://bugs.freedesktop.org/show_bug.cgi?id=108511
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#109485]: https://bugs.freedesktop.org/show_bug.cgi?id=109485
[fdo#110235]: https://bugs.freedesktop.org/show_bug.cgi?id=110235

Participating hosts (44 -> 37)
------------------------------

Additional (1): fi-bdw-5557u
Missing (8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus

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

* Linux: CI_DRM_6299 -> Patchwork_13339

CI_DRM_6299: 2a6cf9f4dc05b77beab4b7d9d1c9f16c7e55a001 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5059: 1f67ee0d09d6513f487f2be74aae9700e755258a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13339: 9a13e1f212c4d6a14bd2876e2b05168db755b784 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

9a13e1f212c4 mm: Use local variable for swap address space

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13339/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
In reply to Stuart Summers
Quoted 7 lines · Stuart Summers

This addresses the following build error:
mm/huge_memory.c: In function ‘__split_huge_page’:
mm/huge_memory.c:2506:41: warning: dereferencing ‘void *’ pointer

    __xa_store(&swap_address_space(entry)->i_pages,
                                         ^~

mm/huge_memory.c:2506:41: error: request for member ‘i_pages’ in something not a structure or union

Did you check under what circumstances it would be a void pointer?

Under those circumstances, what do you think will happen runtime after you've brushed the build error under the carpet?

Anyway, the patch is against a commit in topic/core-for-CI, not to be merged elsewhere.

BR,
Jani.

Quoted 22 lines
---
 mm/huge_memory.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
mm/huge_memory.c +3 -1
index affb2c3667f9..bced5485137b 100644
@@ -2503,7 +2503,9 @@ static void __split_huge_page(struct page *page, struct list_head *list,
 					head + i, 0);
 		} else if (PageSwapCache(page)) {
 			swp_entry_t entry = { .val = page_private(head + i) };
-			__xa_store(&swap_address_space(entry)->i_pages,
+			struct address_space *address_space =
+				swap_address_space(entry);
+			__xa_store(&address_space->i_pages,
 				   swp_offset(entry),
 				   head + i, 0);
 		}
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw
Quoted 10 lines · Jani Nikula
Quoted 7 lines · Stuart Summers

This addresses the following build error:
mm/huge_memory.c: In function ‘__split_huge_page’:
mm/huge_memory.c:2506:41: warning: dereferencing ‘void *’ pointer

    __xa_store(&swap_address_space(entry)->i_pages,
                                         ^~

mm/huge_memory.c:2506:41: error: request for member ‘i_pages’ in something not a structure or union

Did you check under what circumstances it would be a void pointer?

This got things working, but I agree probably needs at least some basic checks here. I'll rework it.

Quoted 7 lines

Under those circumstances, what do you think will happen runtime after
you've brushed the build error under the carpet?

Anyway, the patch is against a commit in topic/core-for-CI, not to be merged elsewhere.

Ok thanks for the feedback and makes sense. I'll resubmit.

Thanks,
Stuart

Quoted 22 lines

BR,
Jani.

Quoted 16 lines
---
 mm/huge_memory.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
mm/huge_memory.c +0 -0
index affb2c3667f9..bced5485137b 100644
@@ -2503,7 +2503,9 @@ static void __split_huge_page(struct page
 *page, struct list_head *list,
 					head + i, 0);
 		} else if (PageSwapCache(page)) {
 			swp_entry_t entry = { .val = page_private(head
Quoted 10 lines

mm/huge_memory.c static void __split_huge_page(struct page *page, struct list_head *list, · line 2511

Quoted 8 lines
mm/huge_memory.c +4 -1
+ i) };
-			__xa_store(&swap_address_space(entry)->i_pages,
+			struct address_space *address_space =
+				swap_address_space(entry);
+			__xa_store(&address_space->i_pages,
 				   swp_offset(entry),
 				   head + i, 0);
 		}

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

#4 lore raw
Quoted 10 lines · Stuart
Quoted 9 lines · Jani Nikula
Quoted 7 lines · Stuart Summers

This addresses the following build error:
mm/huge_memory.c: In function ‘__split_huge_page’:
mm/huge_memory.c:2506:41: warning: dereferencing ‘void *’ pointer

    __xa_store(&swap_address_space(entry)->i_pages,
                                         ^~

mm/huge_memory.c:2506:41: error: request for member ‘i_pages’ in something not a structure or union

Quoted 4 lines
Quoted 1 line

Did you check under what circumstances it would be a void pointer?

This got things working, but I agree probably needs at least some basic checks here. I'll rework it.

Hint: CONFIG_SWAP.

BR,
Jani.

Quoted 46 lines
Quoted 8 lines

Under those circumstances, what do you think will happen runtime after
you've brushed the build error under the carpet?

Anyway, the patch is against a commit in topic/core-for-CI, not to be merged elsewhere.

Ok thanks for the feedback and makes sense. I'll resubmit.

Thanks,
Stuart

Quoted 32 lines

BR,
Jani.

Quoted 24 lines
---
 mm/huge_memory.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
mm/huge_memory.c +4 -1
index affb2c3667f9..bced5485137b 100644
@@ -2503,7 +2503,9 @@ static void __split_huge_page(struct page
 *page, struct list_head *list,
 					head + i, 0);
 		} else if (PageSwapCache(page)) {
 			swp_entry_t entry = { .val = page_private(head
+ i) };
-			__xa_store(&swap_address_space(entry)->i_pages,
+			struct address_space *address_space =
+				swap_address_space(entry);
+			__xa_store(&address_space->i_pages,
 				   swp_offset(entry),
 				   head + i, 0);
 		}
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx