The patch titled Subject: mm/mempolicy: avoid the fallthrough with MPOLD_BIND in mpol_misplaced. has been added to the -mm mm-unstable branch. Its filename is mm-mempolicy-avoid-the-fallthrough-with-mpold_bind-in-mpol_misplaced.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-mempolicy-avoid-the-fallthrough-with-mpold_bind-in-mpol_misplaced.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm 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 via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Donet Tom <donettom@xxxxxxxxxxxxx> Subject: mm/mempolicy: avoid the fallthrough with MPOLD_BIND in mpol_misplaced. Date: Sat, 17 Feb 2024 01:31:34 -0600 We will update MPOL_PREFERRED_MANY in the follow up patch. This change is required for that. Link: https://lkml.kernel.org/r/bf7e6779f842fb65cf7bb9b2c617feb2af271cb7.1708097962.git.donettom@xxxxxxxxxxxxx Signed-off-by: Aneesh Kumar K.V (IBM) <aneesh.kumar@xxxxxxxxxx> Signed-off-by: Donet Tom <donettom@xxxxxxxxxxxxx> Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx> Cc: Ben Widawsky <ben.widawsky@xxxxxxxxx> Cc: Dan Williams <dan.j.williams@xxxxxxxxx> Cc: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx> Cc: Feng Tang <feng.tang@xxxxxxxxx> Cc: "Huang, Ying" <ying.huang@xxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx> Cc: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxxxx> Cc: Mike Kravetz <mike.kravetz@xxxxxxxxxx> Cc: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxxx> Cc: Suren Baghdasaryan <surenb@xxxxxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/mempolicy.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) --- a/mm/mempolicy.c~mm-mempolicy-avoid-the-fallthrough-with-mpold_bind-in-mpol_misplaced +++ a/mm/mempolicy.c @@ -2769,7 +2769,15 @@ int mpol_misplaced(struct folio *folio, break; goto out; } - fallthrough; + + if (node_isset(curnid, pol->nodes)) + goto out; + z = first_zones_zonelist( + node_zonelist(thisnid, GFP_HIGHUSER), + gfp_zone(GFP_HIGHUSER), + &pol->nodes); + polnid = zone_to_nid(z->zone); + break; case MPOL_PREFERRED_MANY: /* _ Patches currently in -mm which might be from donettom@xxxxxxxxxxxxx are mm-mempolicy-use-the-already-fetched-local-variable.patch mm-mempolicy-avoid-the-fallthrough-with-mpold_bind-in-mpol_misplaced.patch mm-numa_balancing-allow-migrate-on-protnone-reference-with-mpol_preferred_many-policy.patch