aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mempolicy.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/mempolicy.c')
-rw-r--r--mm/mempolicy.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index bda230e52acd..643f66e10187 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -1756,10 +1756,12 @@ struct mempolicy *__mpol_dup(struct mempolicy *old)
1756 1756
1757 if (!new) 1757 if (!new)
1758 return ERR_PTR(-ENOMEM); 1758 return ERR_PTR(-ENOMEM);
1759 rcu_read_lock();
1759 if (current_cpuset_is_being_rebound()) { 1760 if (current_cpuset_is_being_rebound()) {
1760 nodemask_t mems = cpuset_mems_allowed(current); 1761 nodemask_t mems = cpuset_mems_allowed(current);
1761 mpol_rebind_policy(old, &mems); 1762 mpol_rebind_policy(old, &mems);
1762 } 1763 }
1764 rcu_read_unlock();
1763 *new = *old; 1765 *new = *old;
1764 atomic_set(&new->refcnt, 1); 1766 atomic_set(&new->refcnt, 1);
1765 return new; 1767 return new;