* [linux-next:master 6918/7793] mm/page_owner.c:818:22: error: passing 'memdesc_flags_t *' to parameter of incompatible type 'memdesc_flags_t'; remove &
@ 2026-07-21 8:34 kernel test robot
2026-07-21 15:14 ` Zi Yan
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2026-07-21 8:34 UTC (permalink / raw)
To: Zi Yan; +Cc: llvm, oe-kbuild-all, Andrew Morton, Linux Memory Management List
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 3fe08b9796f36ef437ab9328e7dd1e5ff2d66603
commit: 2e3c4a69b0c52d1f75d13c3ac380625143888e18 [6918/7793] mm-page_owner-add-numa-node-filter-fix
config: i386-randconfig-r134-20260721 (https://download.01.org/0day-ci/archive/20260721/202607211642.g3Xlz5F8-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260721/202607211642.g3Xlz5F8-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607211642.g3Xlz5F8-lkp@intel.com/
Note: the linux-next/master HEAD 3fe08b9796f36ef437ab9328e7dd1e5ff2d66603 builds fine.
It may have been fixed somewhere.
All errors (new ones prefixed by >>):
>> mm/page_owner.c:818:22: error: passing 'memdesc_flags_t *' to parameter of incompatible type 'memdesc_flags_t'; remove &
818 | nid = memdesc_nid(&page_flags);
| ^~~~~~~~~~~
include/linux/mm.h:2291:47: note: passing argument to parameter 'mdf' here
2291 | static inline int memdesc_nid(memdesc_flags_t mdf)
| ^
1 error generated.
vim +818 mm/page_owner.c
727
728 static ssize_t
729 read_page_owner(struct file *file, char __user *buf, size_t count, loff_t *ppos)
730 {
731 unsigned long pfn;
732 struct page *page;
733 struct page_ext *page_ext;
734 struct page_owner *page_owner;
735 depot_stack_handle_t handle;
736 struct page_owner_filter_state *state = file->private_data;
737
738 if (!static_branch_unlikely(&page_owner_inited))
739 return -EINVAL;
740
741 page = NULL;
742 if (*ppos == 0)
743 pfn = min_low_pfn;
744 else
745 pfn = *ppos;
746 /* Find a valid PFN or the start of a MAX_ORDER_NR_PAGES area */
747 while (!pfn_valid(pfn) && (pfn & (MAX_ORDER_NR_PAGES - 1)) != 0)
748 pfn++;
749
750 /* Find an allocated page */
751 for (; pfn < max_pfn; pfn++) {
752 /*
753 * This temporary page_owner is required so
754 * that we can avoid the context switches while holding
755 * the rcu lock and copying the page owner information to
756 * user through copy_to_user() or GFP_KERNEL allocations.
757 */
758 struct page_owner page_owner_tmp;
759
760 /*
761 * If the new page is in a new MAX_ORDER_NR_PAGES area,
762 * validate the area as existing, skip it if not
763 */
764 if ((pfn & (MAX_ORDER_NR_PAGES - 1)) == 0 && !pfn_valid(pfn)) {
765 pfn += MAX_ORDER_NR_PAGES - 1;
766 continue;
767 }
768
769 page = pfn_to_page(pfn);
770 if (skip_buddy_pages(&pfn, page))
771 continue;
772
773 page_ext = page_ext_get(page);
774 if (unlikely(!page_ext))
775 continue;
776
777 /*
778 * Some pages could be missed by concurrent allocation or free,
779 * because we don't hold the zone lock.
780 */
781 if (!test_bit(PAGE_EXT_OWNER, &page_ext->flags))
782 goto ext_put_continue;
783
784 /*
785 * Although we do have the info about past allocation of free
786 * pages, it's not relevant for current memory usage.
787 */
788 if (!test_bit(PAGE_EXT_OWNER_ALLOCATED, &page_ext->flags))
789 goto ext_put_continue;
790
791 page_owner = get_page_owner(page_ext);
792
793 /*
794 * Don't print "tail" pages of high-order allocations as that
795 * would inflate the stats.
796 */
797 if (!IS_ALIGNED(pfn, 1 << page_owner->order))
798 goto ext_put_continue;
799
800 /*
801 * Access to page_ext->handle isn't synchronous so we should
802 * be careful to access it.
803 */
804 handle = READ_ONCE(page_owner->handle);
805 if (!handle)
806 goto ext_put_continue;
807
808 if (state->nid_filter_enabled) {
809 int nid;
810 memdesc_flags_t page_flags = READ_ONCE(page->flags);
811
812 /*
813 * Bypass PF_POISONED_CHECK() in page_to_nid() to avoid
814 * VM_BUG_ON when accessing poisoned pages.
815 */
816 if (page_flags.f == PAGE_POISON_PATTERN)
817 goto ext_put_continue;
> 818 nid = memdesc_nid(&page_flags);
819 if (!node_isset(nid, state->nid_filter))
820 goto ext_put_continue;
821 }
822
823 /* Record the next PFN to read in the file offset */
824 *ppos = pfn + 1;
825
826 page_owner_tmp = *page_owner;
827 page_ext_put(page_ext);
828 return print_page_owner(buf, count, pfn, page,
829 &page_owner_tmp, handle, state);
830 ext_put_continue:
831 page_ext_put(page_ext);
832 cond_resched();
833 }
834
835 return 0;
836 }
837
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [linux-next:master 6918/7793] mm/page_owner.c:818:22: error: passing 'memdesc_flags_t *' to parameter of incompatible type 'memdesc_flags_t'; remove &
2026-07-21 8:34 [linux-next:master 6918/7793] mm/page_owner.c:818:22: error: passing 'memdesc_flags_t *' to parameter of incompatible type 'memdesc_flags_t'; remove & kernel test robot
@ 2026-07-21 15:14 ` Zi Yan
0 siblings, 0 replies; 2+ messages in thread
From: Zi Yan @ 2026-07-21 15:14 UTC (permalink / raw)
To: Andrew Morton, kernel test robot
Cc: llvm, oe-kbuild-all, Linux Memory Management List
On 21 Jul 2026, at 4:34, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 3fe08b9796f36ef437ab9328e7dd1e5ff2d66603
> commit: 2e3c4a69b0c52d1f75d13c3ac380625143888e18 [6918/7793] mm-page_owner-add-numa-node-filter-fix
> config: i386-randconfig-r134-20260721 (https://download.01.org/0day-ci/archive/20260721/202607211642.g3Xlz5F8-lkp@intel.com/config)
> compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260721/202607211642.g3Xlz5F8-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202607211642.g3Xlz5F8-lkp@intel.com/
>
> Note: the linux-next/master HEAD 3fe08b9796f36ef437ab9328e7dd1e5ff2d66603 builds fine.
> It may have been fixed somewhere.
>
> All errors (new ones prefixed by >>):
>
>>> mm/page_owner.c:818:22: error: passing 'memdesc_flags_t *' to parameter of incompatible type 'memdesc_flags_t'; remove &
> 818 | nid = memdesc_nid(&page_flags);
> | ^~~~~~~~~~~
> include/linux/mm.h:2291:47: note: passing argument to parameter 'mdf' here
> 2291 | static inline int memdesc_nid(memdesc_flags_t mdf)
> | ^
> 1 error generated.
Hi Andrew,
This patch should be folded into [1], which converts memdesc_nid() signature
from memdesc_flags_t to memdesc_flags_t*, since [1] comes after
Zhen Ni’s page owner patchset. Can you do that?
When I tested Zhen Ni’s page owner patchset, I reverted the older series
on top of linux-mm/mm-new and applied the new series. I got a compilation
error and sent this fix but did not notice memdesc_nid() was changed in [1].
Sorry for the confusion.
Thanks.
[1] https://lore.kernel.org/all/20260630070810.470763-1-hui.zhu@linux.dev/, its commit id is 357d3450fb9fd999994549e0b3e980de78bcd673 on mm-unstable
>
>
> vim +818 mm/page_owner.c
>
> 727
> 728 static ssize_t
> 729 read_page_owner(struct file *file, char __user *buf, size_t count, loff_t *ppos)
> 730 {
> 731 unsigned long pfn;
> 732 struct page *page;
> 733 struct page_ext *page_ext;
> 734 struct page_owner *page_owner;
> 735 depot_stack_handle_t handle;
> 736 struct page_owner_filter_state *state = file->private_data;
> 737
> 738 if (!static_branch_unlikely(&page_owner_inited))
> 739 return -EINVAL;
> 740
> 741 page = NULL;
> 742 if (*ppos == 0)
> 743 pfn = min_low_pfn;
> 744 else
> 745 pfn = *ppos;
> 746 /* Find a valid PFN or the start of a MAX_ORDER_NR_PAGES area */
> 747 while (!pfn_valid(pfn) && (pfn & (MAX_ORDER_NR_PAGES - 1)) != 0)
> 748 pfn++;
> 749
> 750 /* Find an allocated page */
> 751 for (; pfn < max_pfn; pfn++) {
> 752 /*
> 753 * This temporary page_owner is required so
> 754 * that we can avoid the context switches while holding
> 755 * the rcu lock and copying the page owner information to
> 756 * user through copy_to_user() or GFP_KERNEL allocations.
> 757 */
> 758 struct page_owner page_owner_tmp;
> 759
> 760 /*
> 761 * If the new page is in a new MAX_ORDER_NR_PAGES area,
> 762 * validate the area as existing, skip it if not
> 763 */
> 764 if ((pfn & (MAX_ORDER_NR_PAGES - 1)) == 0 && !pfn_valid(pfn)) {
> 765 pfn += MAX_ORDER_NR_PAGES - 1;
> 766 continue;
> 767 }
> 768
> 769 page = pfn_to_page(pfn);
> 770 if (skip_buddy_pages(&pfn, page))
> 771 continue;
> 772
> 773 page_ext = page_ext_get(page);
> 774 if (unlikely(!page_ext))
> 775 continue;
> 776
> 777 /*
> 778 * Some pages could be missed by concurrent allocation or free,
> 779 * because we don't hold the zone lock.
> 780 */
> 781 if (!test_bit(PAGE_EXT_OWNER, &page_ext->flags))
> 782 goto ext_put_continue;
> 783
> 784 /*
> 785 * Although we do have the info about past allocation of free
> 786 * pages, it's not relevant for current memory usage.
> 787 */
> 788 if (!test_bit(PAGE_EXT_OWNER_ALLOCATED, &page_ext->flags))
> 789 goto ext_put_continue;
> 790
> 791 page_owner = get_page_owner(page_ext);
> 792
> 793 /*
> 794 * Don't print "tail" pages of high-order allocations as that
> 795 * would inflate the stats.
> 796 */
> 797 if (!IS_ALIGNED(pfn, 1 << page_owner->order))
> 798 goto ext_put_continue;
> 799
> 800 /*
> 801 * Access to page_ext->handle isn't synchronous so we should
> 802 * be careful to access it.
> 803 */
> 804 handle = READ_ONCE(page_owner->handle);
> 805 if (!handle)
> 806 goto ext_put_continue;
> 807
> 808 if (state->nid_filter_enabled) {
> 809 int nid;
> 810 memdesc_flags_t page_flags = READ_ONCE(page->flags);
> 811
> 812 /*
> 813 * Bypass PF_POISONED_CHECK() in page_to_nid() to avoid
> 814 * VM_BUG_ON when accessing poisoned pages.
> 815 */
> 816 if (page_flags.f == PAGE_POISON_PATTERN)
> 817 goto ext_put_continue;
>> 818 nid = memdesc_nid(&page_flags);
> 819 if (!node_isset(nid, state->nid_filter))
> 820 goto ext_put_continue;
> 821 }
> 822
> 823 /* Record the next PFN to read in the file offset */
> 824 *ppos = pfn + 1;
> 825
> 826 page_owner_tmp = *page_owner;
> 827 page_ext_put(page_ext);
> 828 return print_page_owner(buf, count, pfn, page,
> 829 &page_owner_tmp, handle, state);
> 830 ext_put_continue:
> 831 page_ext_put(page_ext);
> 832 cond_resched();
> 833 }
> 834
> 835 return 0;
> 836 }
> 837
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
Best Regards,
Yan, Zi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-21 15:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-21 8:34 [linux-next:master 6918/7793] mm/page_owner.c:818:22: error: passing 'memdesc_flags_t *' to parameter of incompatible type 'memdesc_flags_t'; remove & kernel test robot
2026-07-21 15:14 ` Zi Yan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox