Message ID | 20220408200908.9C9E9C385A3@smtp.kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/9] mm: migrate: use thp_order instead of HPAGE_PMD_ORDER for new page allocation. | expand |
--- a/mm/mempolicy.c~mm-mempolicy-fix-mpol_new-leak-in-shared_policy_replace +++ a/mm/mempolicy.c @@ -2733,6 +2733,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; }