diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index cc1b01cf2035bced50bfc5d0015d1b6de7a7781b..3fe661fe96d13e534f2b1ece47a409b1609f055c 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h @@ -110,10 +110,14 @@ static inline bool put_mems_allowed(unsigned int seq) static inline void set_mems_allowed(nodemask_t nodemask) { + unsigned long flags; + task_lock(current); + local_irq_save(flags); write_seqcount_begin(¤t->mems_allowed_seq); current->mems_allowed = nodemask; write_seqcount_end(¤t->mems_allowed_seq); + local_irq_restore(flags); task_unlock(current); }