* + mm-page_alloc-add-a-bulk-page-allocator-fix-fix.patch added to -mm tree
@ 2021-03-31 4:54 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2021-03-31 4:54 UTC (permalink / raw)
To: colin.king, mgorman, mm-commits
The patch titled
Subject: mm/page_alloc: Add a bulk page allocator -fix -fix
has been added to the -mm tree. Its filename is
mm-page_alloc-add-a-bulk-page-allocator-fix-fix.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mm-page_alloc-add-a-bulk-page-allocator-fix-fix.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mm-page_alloc-add-a-bulk-page-allocator-fix-fix.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Mel Gorman <mgorman@techsingularity.net>
Subject: mm/page_alloc: Add a bulk page allocator -fix -fix
Colin Ian King reported the following problem (slightly edited)
Author: Mel Gorman <mgorman@techsingularity.net>
Date: Mon Mar 29 11:12:24 2021 +1100
mm/page_alloc: add a bulk page allocator
...
Static analysis on linux-next with Coverity has found a potential
uninitialized variable issue in function __alloc_pages_bulk with
the following commit:
...
Uninitialized scalar variable (UNINIT)
15. uninit_use_in_call: Using uninitialized value alloc_flags when
calling prepare_alloc_pages.
5056 if (!prepare_alloc_pages(gfp, 0, preferred_nid, nodemask,
&ac, &alloc_gfp, &alloc_flags))
The problem is that prepare_alloc_flags only updates alloc_flags
which must have a valid initial value. The appropriate initial value is
ALLOC_WMARK_LOW to avoid the bulk allocator pushing a zone below the low
watermark without waking kswapd assuming the GFP mask allows kswapd to
be woken.
This is a second fix to the mmotm patch
mm-page_alloc-add-a-bulk-page-allocator.patch . It will cause a mild conflict
with a later patch due to renaming of an adjacent variable that is trivially
resolved. I can post a full series with the fixes merged if that is preferred.
Link: https://lkml.kernel.org/r/20210330114847.GX3697@techsingularity.net
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Reported-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Colin Ian King <colin.king@canonical.com>
Tested-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/page_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/page_alloc.c~mm-page_alloc-add-a-bulk-page-allocator-fix-fix
+++ a/mm/page_alloc.c
@@ -5031,7 +5031,7 @@ unsigned long __alloc_pages_bulk(gfp_t g
struct list_head *pcp_list;
struct alloc_context ac;
gfp_t alloc_gfp;
- unsigned int alloc_flags;
+ unsigned int alloc_flags = ALLOC_WMARK_LOW;
int allocated = 0;
if (WARN_ON_ONCE(nr_pages <= 0))
_
Patches currently in -mm which might be from mgorman@techsingularity.net are
mm-page_alloc-rename-alloced-to-allocated.patch
mm-page_alloc-add-a-bulk-page-allocator.patch
mm-page_alloc-add-a-bulk-page-allocator-fix.patch
mm-page_alloc-add-a-bulk-page-allocator-fix-fix.patch
mm-page_alloc-add-an-array-based-interface-to-the-bulk-page-allocator.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-31 4:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-31 4:54 + mm-page_alloc-add-a-bulk-page-allocator-fix-fix.patch added to -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).