diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-13 17:43:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-13 17:43:01 -0500 |
commit | 4e3eaddd142e2142c048c5052a0a9d2604fccfc6 (patch) | |
tree | 5bc45a286502e54e790c54948f22364c5afd9d89 /mm/mempolicy.c | |
parent | 8655e7e3ddec60603c4f6c14cdf642e2ba198df8 (diff) | |
parent | b97c4bc16734a2e597dac7f91ee9eb78f4aeef9a (diff) |
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
locking: Make sparse work with inline spinlocks and rwlocks
x86/mce: Fix RCU lockdep splats
rcu: Increase RCU CPU stall timeouts if PROVE_RCU
ftrace: Replace read_barrier_depends() with rcu_dereference_raw()
rcu: Suppress RCU lockdep warnings during early boot
rcu, ftrace: Fix RCU lockdep splat in ftrace_perf_buf_prepare()
rcu: Suppress __mpol_dup() false positive from RCU lockdep
rcu: Make rcu_read_lock_sched_held() handle !PREEMPT
rcu: Add control variables to lockdep_rcu_dereference() diagnostics
rcu, cgroup: Relax the check in task_subsys_state() as early boot is now handled by lockdep-RCU
rcu: Use wrapper function instead of exporting tasklist_lock
sched, rcu: Fix rcu_dereference() for RCU-lockdep
rcu: Make task_subsys_state() RCU-lockdep checks handle boot-time use
rcu: Fix holdoff for accelerated GPs for last non-dynticked CPU
x86/gart: Unexport gart_iommu_aperture
Fix trivial conflicts in kernel/trace/ftrace.c
Diffstat (limited to 'mm/mempolicy.c')
-rw-r--r-- | mm/mempolicy.c | 2 |
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; |