From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [linux-next:master 7701/8232] mm/huge_memory.c:2735 __discard_anon_folio_pmd_locked() error: uninitialized symbol 'page'.
Date: Thu, 27 Jun 2024 01:17:18 +0800 [thread overview]
Message-ID: <202406270108.7yneS068-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Lance Yang <ioworker0@gmail.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 0fc4bfab2cd45f9acb86c4f04b5191e114e901ed
commit: 4627108658d68fad359600dbe667b88b501cee71 [7701/8232] mm/vmscan: avoid split lazyfree THP during shrink_folio_list()
:::::: branch date: 25 hours ago
:::::: commit date: 2 days ago
config: i386-randconfig-141-20240626 (https://download.01.org/0day-ci/archive/20240627/202406270108.7yneS068-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202406270108.7yneS068-lkp@intel.com/
smatch warnings:
mm/huge_memory.c:2735 __discard_anon_folio_pmd_locked() error: uninitialized symbol 'page'.
vim +/page +2735 mm/huge_memory.c
e9b61f19858a5d Kirill A. Shutemov 2016-01-15 2691
4627108658d68f Lance Yang 2024-06-14 2692 static bool __discard_anon_folio_pmd_locked(struct vm_area_struct *vma,
4627108658d68f Lance Yang 2024-06-14 2693 unsigned long addr, pmd_t *pmdp,
4627108658d68f Lance Yang 2024-06-14 2694 struct folio *folio)
4627108658d68f Lance Yang 2024-06-14 2695 {
4627108658d68f Lance Yang 2024-06-14 2696 struct mm_struct *mm = vma->vm_mm;
4627108658d68f Lance Yang 2024-06-14 2697 int ref_count, map_count;
4627108658d68f Lance Yang 2024-06-14 2698 pmd_t orig_pmd = *pmdp;
4627108658d68f Lance Yang 2024-06-14 2699 struct page *page;
4627108658d68f Lance Yang 2024-06-14 2700
4627108658d68f Lance Yang 2024-06-14 2701 if (folio_test_dirty(folio) || pmd_dirty(orig_pmd))
4627108658d68f Lance Yang 2024-06-14 2702 return false;
4627108658d68f Lance Yang 2024-06-14 2703
4627108658d68f Lance Yang 2024-06-14 2704 orig_pmd = pmdp_huge_clear_flush(vma, addr, pmdp);
4627108658d68f Lance Yang 2024-06-14 2705
4627108658d68f Lance Yang 2024-06-14 2706 /*
4627108658d68f Lance Yang 2024-06-14 2707 * Syncing against concurrent GUP-fast:
4627108658d68f Lance Yang 2024-06-14 2708 * - clear PMD; barrier; read refcount
4627108658d68f Lance Yang 2024-06-14 2709 * - inc refcount; barrier; read PMD
4627108658d68f Lance Yang 2024-06-14 2710 */
4627108658d68f Lance Yang 2024-06-14 2711 smp_mb();
4627108658d68f Lance Yang 2024-06-14 2712
4627108658d68f Lance Yang 2024-06-14 2713 ref_count = folio_ref_count(folio);
4627108658d68f Lance Yang 2024-06-14 2714 map_count = folio_mapcount(folio);
4627108658d68f Lance Yang 2024-06-14 2715
4627108658d68f Lance Yang 2024-06-14 2716 /*
4627108658d68f Lance Yang 2024-06-14 2717 * Order reads for folio refcount and dirty flag
4627108658d68f Lance Yang 2024-06-14 2718 * (see comments in __remove_mapping()).
4627108658d68f Lance Yang 2024-06-14 2719 */
4627108658d68f Lance Yang 2024-06-14 2720 smp_rmb();
4627108658d68f Lance Yang 2024-06-14 2721
4627108658d68f Lance Yang 2024-06-14 2722 /*
4627108658d68f Lance Yang 2024-06-14 2723 * If the folio or its PMD is redirtied at this point, or if there
4627108658d68f Lance Yang 2024-06-14 2724 * are unexpected references, we will give up to discard this folio
4627108658d68f Lance Yang 2024-06-14 2725 * and remap it.
4627108658d68f Lance Yang 2024-06-14 2726 *
4627108658d68f Lance Yang 2024-06-14 2727 * The only folio refs must be one from isolation plus the rmap(s).
4627108658d68f Lance Yang 2024-06-14 2728 */
4627108658d68f Lance Yang 2024-06-14 2729 if (folio_test_dirty(folio) || pmd_dirty(orig_pmd) ||
4627108658d68f Lance Yang 2024-06-14 2730 ref_count != map_count + 1) {
4627108658d68f Lance Yang 2024-06-14 2731 set_pmd_at(mm, addr, pmdp, orig_pmd);
4627108658d68f Lance Yang 2024-06-14 2732 return false;
4627108658d68f Lance Yang 2024-06-14 2733 }
4627108658d68f Lance Yang 2024-06-14 2734
4627108658d68f Lance Yang 2024-06-14 @2735 folio_remove_rmap_pmd(folio, page, vma);
4627108658d68f Lance Yang 2024-06-14 2736 zap_deposited_table(mm, pmdp);
4627108658d68f Lance Yang 2024-06-14 2737 add_mm_counter(mm, MM_ANONPAGES, -HPAGE_PMD_NR);
4627108658d68f Lance Yang 2024-06-14 2738 if (vma->vm_flags & VM_LOCKED)
4627108658d68f Lance Yang 2024-06-14 2739 mlock_drain_local();
4627108658d68f Lance Yang 2024-06-14 2740 folio_put(folio);
4627108658d68f Lance Yang 2024-06-14 2741
4627108658d68f Lance Yang 2024-06-14 2742 return true;
4627108658d68f Lance Yang 2024-06-14 2743 }
4627108658d68f Lance Yang 2024-06-14 2744
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-06-26 17:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202406270108.7yneS068-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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 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.