[3.19.y-ckt stable] Patch "cpuset: use trialcs->mems_allowed as a temp variable" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Mon Sep 21 22:26:14 UTC 2015


This is a note to let you know that I have just added a patch titled

    cpuset: use trialcs->mems_allowed as a temp variable

to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue

This patch is scheduled to be released in version 3.19.8-ckt7.

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.19.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From 0f039ab7a8e507e74426986419b2c0810159b04d Mon Sep 17 00:00:00 2001
From: Alban Crequy <alban.crequy at gmail.com>
Date: Thu, 6 Aug 2015 16:21:05 +0200
Subject: cpuset: use trialcs->mems_allowed as a temp variable
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

commit 24ee3cf89bef04e8bc23788aca4e029a3f0f06d9 upstream.

The comment says it's using trialcs->mems_allowed as a temp variable but
it didn't match the code. Change the code to match the comment.

This fixes an issue when writing in cpuset.mems when a sub-directory
exists: we need to write several times for the information to persist:

| root at alban:/sys/fs/cgroup/cpuset# mkdir footest9
| root at alban:/sys/fs/cgroup/cpuset# cd footest9
| root at alban:/sys/fs/cgroup/cpuset/footest9# mkdir aa
| root at alban:/sys/fs/cgroup/cpuset/footest9# cat cpuset.mems
|
| root at alban:/sys/fs/cgroup/cpuset/footest9# echo 0 > cpuset.mems
| root at alban:/sys/fs/cgroup/cpuset/footest9# cat cpuset.mems
|
| root at alban:/sys/fs/cgroup/cpuset/footest9# echo 0 > cpuset.mems
| root at alban:/sys/fs/cgroup/cpuset/footest9# cat cpuset.mems
| 0
| root at alban:/sys/fs/cgroup/cpuset/footest9# cat aa/cpuset.mems
|
| root at alban:/sys/fs/cgroup/cpuset/footest9# echo 0 > aa/cpuset.mems
| root at alban:/sys/fs/cgroup/cpuset/footest9# cat aa/cpuset.mems
| 0
| root at alban:/sys/fs/cgroup/cpuset/footest9#

This should help to fix the following issue in Docker:
https://github.com/opencontainers/runc/issues/133
In some conditions, a Docker container needs to be started twice in
order to work.

Signed-off-by: Alban Crequy <alban at endocode.com>
Tested-by: Iago López Galeiras <iago at endocode.com>
Acked-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 9e25599..c90edf6 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1214,7 +1214,7 @@ static int update_nodemask(struct cpuset *cs, struct cpuset *trialcs,
 	spin_unlock_irq(&callback_lock);

 	/* use trialcs->mems_allowed as a temp variable */
-	update_nodemasks_hier(cs, &cs->mems_allowed);
+	update_nodemasks_hier(cs, &trialcs->mems_allowed);
 done:
 	return retval;
 }
--
1.9.1





More information about the kernel-team mailing list