From: Dan Carpenter <dan.carpenter@oracle.com>
To: sfr@canb.auug.org.au
Cc: linux-mm@kvack.org, Ben Widawsky <ben.widawsky@intel.com>
Subject: [bug report] Merge branch 'akpm-current/current'
Date: Wed, 11 Aug 2021 11:06:00 +0300 [thread overview]
Message-ID: <20210811080600.GA15247@kili> (raw)
[ I do a git show 2db9f815409f and it doesn't show that hugetlb.c was
modified but it the git log the merge commit is listed. I don't
know git well enough to explain it. But I think this was a merge
issue. - dan ]
Hello Stephen Rothwell,
The patch 2db9f815409f: "Merge branch 'akpm-current/current'" from
Aug 10, 2021, leads to the following
Smatch static checker warning:
mm/hugetlb.c:2172 alloc_buddy_huge_page_with_mpol()
error: uninitialized symbol 'page'.
mm/hugetlb.c
2151 static
2152 struct page *alloc_buddy_huge_page_with_mpol(struct hstate *h,
2153 struct vm_area_struct *vma, unsigned long addr)
2154 {
2155 struct page *page;
This should be "struct page *page = NULL;"
2156 struct mempolicy *mpol;
2157 gfp_t gfp_mask = htlb_alloc_mask(h);
2158 int nid;
2159 nodemask_t *nodemask;
2160
2161 nid = huge_node(vma, addr, gfp_mask, &mpol, &nodemask);
2162 if (mpol_is_preferred_many(mpol)) {
2163 gfp_t gfp = gfp_mask | __GFP_NOWARN;
2164
2165 gfp &= ~(__GFP_DIRECT_RECLAIM | __GFP_NOFAIL);
2166 page = alloc_surplus_huge_page(h, gfp, nid, nodemask, false);
2167
2168 /* Fallback to all nodes if page==NULL */
2169 nodemask = NULL;
2170 }
2171
--> 2172 if (!page)
2173 page = alloc_surplus_huge_page(h, gfp_mask, nid, nodemask, false);
2174 mpol_cond_put(mpol);
2175 return page;
2176 }
regards,
dan carpenter
next reply other threads:[~2021-08-11 8:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-11 8:06 Dan Carpenter [this message]
2021-08-11 8:13 ` [bug report] Merge branch 'akpm-current/current' Feng Tang
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=20210811080600.GA15247@kili \
--to=dan.carpenter@oracle.com \
--cc=ben.widawsky@intel.com \
--cc=linux-mm@kvack.org \
--cc=sfr@canb.auug.org.au \
/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.