From: kernel test robot <lkp@intel.com>
To: Guillaume Morin <guillaume@morinfr.org>, linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-mm@kvack.org, guillaume@morinfr.org,
Muchun Song <muchun.song@linux.dev>,
Andrew Morton <akpm@linux-foundation.org>,
Peter Xu <peterx@redhat.com>,
David Hildenbrand <david@redhat.com>,
Eric Hagberg <ehagberg@janestreet.com>
Subject: Re: [PATCH v1] hugetlb: support FOLL_FORCE|FOLL_WRITE
Date: Thu, 5 Dec 2024 09:23:04 +0800 [thread overview]
Message-ID: <202412050954.m9cwNOJC-lkp@intel.com> (raw)
In-Reply-To: <Z1Ce6j5WiBE3kaGf@bender.morinfr.org>
Hi Guillaume,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-everything]
[also build test WARNING on linus/master v6.13-rc1 next-20241204]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Guillaume-Morin/hugetlb-support-FOLL_FORCE-FOLL_WRITE/20241205-022843
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/Z1Ce6j5WiBE3kaGf%40bender.morinfr.org
patch subject: [PATCH v1] hugetlb: support FOLL_FORCE|FOLL_WRITE
config: x86_64-buildonly-randconfig-002-20241205 (https://download.01.org/0day-ci/archive/20241205/202412050954.m9cwNOJC-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241205/202412050954.m9cwNOJC-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/202412050954.m9cwNOJC-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from mm/gup.c:7:
In file included from include/linux/mm.h:2223:
include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
504 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
505 | item];
| ~~~~
include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
511 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
512 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
524 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
525 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
In file included from mm/gup.c:20:
include/linux/mm_inline.h:47:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
47 | __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
| ~~~~~~~~~~~ ^ ~~~
include/linux/mm_inline.h:49:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
49 | NR_ZONE_LRU_BASE + lru, nr_pages);
| ~~~~~~~~~~~~~~~~ ^ ~~~
>> mm/gup.c:681:33: warning: variable 'page' is uninitialized when used here [-Wuninitialized]
681 | !can_follow_write_pud(pud, page, vma, flags))
| ^~~~
mm/gup.c:673:19: note: initialize the variable 'page' to silence this warning
673 | struct page *page;
| ^
| = NULL
7 warnings generated.
vim +/page +681 mm/gup.c
667
668 static struct page *follow_huge_pud(struct vm_area_struct *vma,
669 unsigned long addr, pud_t *pudp,
670 int flags, struct follow_page_context *ctx)
671 {
672 struct mm_struct *mm = vma->vm_mm;
673 struct page *page;
674 pud_t pud = *pudp;
675 unsigned long pfn = pud_pfn(pud);
676 int ret;
677
678 assert_spin_locked(pud_lockptr(mm, pudp));
679
680 if ((flags & FOLL_WRITE) &&
> 681 !can_follow_write_pud(pud, page, vma, flags))
682 return NULL;
683
684 if (!pud_present(pud))
685 return NULL;
686
687 pfn += (addr & ~PUD_MASK) >> PAGE_SHIFT;
688
689 if (IS_ENABLED(CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD) &&
690 pud_devmap(pud)) {
691 /*
692 * device mapped pages can only be returned if the caller
693 * will manage the page reference count.
694 *
695 * At least one of FOLL_GET | FOLL_PIN must be set, so
696 * assert that here:
697 */
698 if (!(flags & (FOLL_GET | FOLL_PIN)))
699 return ERR_PTR(-EEXIST);
700
701 if (flags & FOLL_TOUCH)
702 touch_pud(vma, addr, pudp, flags & FOLL_WRITE);
703
704 ctx->pgmap = get_dev_pagemap(pfn, ctx->pgmap);
705 if (!ctx->pgmap)
706 return ERR_PTR(-EFAULT);
707 }
708
709 page = pfn_to_page(pfn);
710
711 if (!pud_devmap(pud) && !pud_write(pud) &&
712 gup_must_unshare(vma, flags, page))
713 return ERR_PTR(-EMLINK);
714
715 ret = try_grab_folio(page_folio(page), 1, flags);
716 if (ret)
717 page = ERR_PTR(ret);
718 else
719 ctx->page_mask = HPAGE_PUD_NR - 1;
720
721 return page;
722 }
723
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-12-05 1:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 18:26 Guillaume Morin
2024-12-04 19:01 ` David Hildenbrand
2024-12-04 19:13 ` Guillaume Morin
2024-12-04 19:30 ` David Hildenbrand
2024-12-05 0:39 ` kernel test robot
2024-12-05 1:42 ` Guillaume Morin
2024-12-05 1:56 ` Guillaume Morin
2024-12-05 1:23 ` kernel test robot [this message]
2024-12-05 2:05 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202412050954.m9cwNOJC-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=ehagberg@janestreet.com \
--cc=guillaume@morinfr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
--cc=muchun.song@linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=peterx@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox