]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - kernel/cpuset.c
cpuset: fix a race condition in __cpuset_node_allowed_softwall()
[karo-tx-linux.git] / kernel / cpuset.c
index dba9e4aef69aefce92aa7f0cc1a31996c2da64d9..e6b1b66afe526acfa2a9ecbfc5bad9da76e8d9b4 100644 (file)
@@ -2482,9 +2482,9 @@ int __cpuset_node_allowed_softwall(int node, gfp_t gfp_mask)
 
        task_lock(current);
        cs = nearest_hardwall_ancestor(task_cs(current));
+       allowed = node_isset(node, cs->mems_allowed);
        task_unlock(current);
 
-       allowed = node_isset(node, cs->mems_allowed);
        mutex_unlock(&callback_mutex);
        return allowed;
 }