aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mempolicy.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-04-08 14:31:41 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2022-04-08 14:31:41 -1000
commit911b2b95168c7790ed5ea2703d804086c03088df (patch)
tree221e4fa69720af910218cb676bf71d99ec4dedae /mm/mempolicy.c
parent1a3b1bba7c7a5eb8a11513cf88427cb9d77bc60a (diff)
parent4071a1b9e24ee394b7492bff7542707ee9ad986d (diff)
downloadlinux-911b2b95168c7790ed5ea2703d804086c03088df.tar.gz
Merge branch 'akpm' (patches from Andrew)
Merge fixes from Andrew Morton: "9 patches. Subsystems affected by this patch series: mm (migration, highmem, sparsemem, mremap, mempolicy, and memcg), lz4, mailmap, and MAINTAINERS" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: MAINTAINERS: add Tom as clang reviewer mm/list_lru.c: revert "mm/list_lru: optimize memcg_reparent_list_lru_node()" mailmap: update Vasily Averin's email address mm/mempolicy: fix mpol_new leak in shared_policy_replace mmmremap.c: avoid pointless invalidate_range_start/end on mremap(old_size=0) mm/sparsemem: fix 'mem_section' will never be NULL gcc 12 warning lz4: fix LZ4_decompress_safe_partial read out of bound highmem: fix checks in __kmap_local_sched_{in,out} mm: migrate: use thp_order instead of HPAGE_PMD_ORDER for new page allocation.
Diffstat (limited to 'mm/mempolicy.c')
-rw-r--r--mm/mempolicy.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 649bd3be8682ac..8c74107a2b15e0 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2743,6 +2743,7 @@ alloc_new:
mpol_new = kmem_cache_alloc(policy_cache, GFP_KERNEL);
if (!mpol_new)
goto err_out;
+ atomic_set(&mpol_new->refcnt, 1);
goto restart;
}