[3.8.y.z extended stable] Patch "cpuset: fix a race condition in __cpuset_node_allowed_softwall()" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Fri Mar 28 00:53:54 UTC 2014
This is a note to let you know that I have just added a patch titled
cpuset: fix a race condition in __cpuset_node_allowed_softwall()
to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.8.y-queue
This patch is scheduled to be released in version 3.8.13.21.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.8.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From 4cb1ef0248da2cffa0dcb32eab1578651dbc381a Mon Sep 17 00:00:00 2001
From: Li Zefan <lizefan at huawei.com>
Date: Thu, 27 Feb 2014 18:19:36 +0800
Subject: cpuset: fix a race condition in __cpuset_node_allowed_softwall()
commit 99afb0fd5f05aac467ffa85c36778fec4396209b upstream.
It's not safe to access task's cpuset after releasing task_lock().
Holding callback_mutex won't help.
Signed-off-by: Li Zefan <lizefan at huawei.com>
Signed-off-by: Tejun Heo <tj at kernel.org>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
kernel/cpuset.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index aa4ec01..47e7595 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -2370,9 +2370,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;
}
--
1.8.3.2
More information about the kernel-team
mailing list