From: Dan Carpenter <dan.carpenter@linaro.org>
To: Vishal Moola <vishal.moola@gmail.com>
Cc: oe-kbuild@lists.linux.dev, Aristeu Rozanski <aris@redhat.com>,
lkp@intel.com, oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [linux-next:master 7944/8232] mm/hugetlb.c:2677 gather_surplus_pages() error: uninitialized symbol 'folio'.
Date: Mon, 1 Jul 2024 21:47:41 +0200 [thread overview]
Message-ID: <16438a9b-ef57-459d-a79e-8bdd7c80cbc1@suswa.mountain> (raw)
In-Reply-To: <668300a6.170a0220.cdc45.7372@mx.google.com>
On Mon, Jul 01, 2024 at 12:16:52PM -0700, Vishal Moola wrote:
> On Mon, Jul 01, 2024 at 05:49:34PM +0200, Dan Carpenter wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head: df9574a57d02b265322e77fb8628d4d33641dda9
> > commit: 1cb6271d927cdb448a6a2794291c5405f1effa76 [7944/8232] hugetlb: force allocating surplus hugepages on mempolicy allowed nodes
> > config: i386-randconfig-141-20240627 (https://download.01.org/0day-ci/archive/20240627/202406270727.F4yNrBsh-lkp@intel.com/config)
> > compiler: gcc-9 (Ubuntu 9.5.0-4ubuntu2) 9.5.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 <dan.carpenter@linaro.org>
> > | Closes: https://lore.kernel.org/r/202406270727.F4yNrBsh-lkp@intel.com/
> >
> > smatch warnings:
> > mm/hugetlb.c:2677 gather_surplus_pages() error: uninitialized symbol 'folio'.
> >
> > vim +/folio +2677 mm/hugetlb.c
> >
> > 0a4f3d1bb91cac Liu Xiang 2020-12-14 2644 static int gather_surplus_pages(struct hstate *h, long delta)
> > 1b2a1e7bb9ce99 Jules Irenge 2020-04-06 2645 __must_hold(&hugetlb_lock)
> > e4e574b767ba63 Adam Litke 2007-10-16 2646 {
> > 3466534131b28e Miaohe Lin 2022-09-01 2647 LIST_HEAD(surplus_list);
> > 454a00c40a21c5 Matthew Wilcox (Oracle 2023-08-16 2648) struct folio *folio, *tmp;
> > 0a4f3d1bb91cac Liu Xiang 2020-12-14 2649 int ret;
> > 0a4f3d1bb91cac Liu Xiang 2020-12-14 2650 long i;
> > 0a4f3d1bb91cac Liu Xiang 2020-12-14 2651 long needed, allocated;
> > 28073b02bfaaed Hillf Danton 2012-03-21 2652 bool alloc_ok = true;
> > 1cb6271d927cdb Aristeu Rozanski 2024-06-21 2653 int node;
> > 1cb6271d927cdb Aristeu Rozanski 2024-06-21 2654 nodemask_t *mbind_nodemask = policy_mbind_nodemask(htlb_alloc_mask(h));
> > e4e574b767ba63 Adam Litke 2007-10-16 2655
> > 9487ca60fd7fa2 Mike Kravetz 2021-05-04 2656 lockdep_assert_held(&hugetlb_lock);
> > a5516438959d90 Andi Kleen 2008-07-23 2657 needed = (h->resv_huge_pages + delta) - h->free_huge_pages;
> > ac09b3a15154af Adam Litke 2008-03-04 2658 if (needed <= 0) {
> > a5516438959d90 Andi Kleen 2008-07-23 2659 h->resv_huge_pages += delta;
> > e4e574b767ba63 Adam Litke 2007-10-16 2660 return 0;
> > ac09b3a15154af Adam Litke 2008-03-04 2661 }
> > e4e574b767ba63 Adam Litke 2007-10-16 2662
> > e4e574b767ba63 Adam Litke 2007-10-16 2663 allocated = 0;
> > e4e574b767ba63 Adam Litke 2007-10-16 2664
> > e4e574b767ba63 Adam Litke 2007-10-16 2665 ret = -ENOMEM;
> > e4e574b767ba63 Adam Litke 2007-10-16 2666 retry:
> > db71ef79b59bb2 Mike Kravetz 2021-05-04 2667 spin_unlock_irq(&hugetlb_lock);
> > e4e574b767ba63 Adam Litke 2007-10-16 2668 for (i = 0; i < needed; i++) {
> > 1cb6271d927cdb Aristeu Rozanski 2024-06-21 2669 for_each_node_mask(node, cpuset_current_mems_allowed) {
>
> Smatch might be concerned about us skipping over this
> for_each_node_mask()? It appears to be possible if we have 1 non-empty
> Numa node.
>
Oh, yes, good point. That too. Thanks for looking at this.
regards,
dan carpenter
prev parent reply other threads:[~2024-07-01 19:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-01 15:49 Dan Carpenter
2024-07-01 19:16 ` Vishal Moola
2024-07-01 19:47 ` Dan Carpenter [this message]
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=16438a9b-ef57-459d-a79e-8bdd7c80cbc1@suswa.mountain \
--to=dan.carpenter@linaro.org \
--cc=akpm@linux-foundation.org \
--cc=aris@redhat.com \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=vishal.moola@gmail.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