[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1442944358-1248-53-git-send-email-kamal@canonical.com>
Date: Tue, 22 Sep 2015 10:51:48 -0700
From: Kamal Mostafa <kamal@...onical.com>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
kernel-team@...ts.ubuntu.com
Cc: Alban Crequy <alban@...ocode.com>, Tejun Heo <tj@...nel.org>,
Kamal Mostafa <kamal@...onical.com>
Subject: [PATCH 3.19.y-ckt 052/102] cpuset: use trialcs->mems_allowed as a temp variable
3.19.8-ckt7 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Alban Crequy <alban.crequy@...il.com>
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@...an:/sys/fs/cgroup/cpuset# mkdir footest9
| root@...an:/sys/fs/cgroup/cpuset# cd footest9
| root@...an:/sys/fs/cgroup/cpuset/footest9# mkdir aa
| root@...an:/sys/fs/cgroup/cpuset/footest9# cat cpuset.mems
|
| root@...an:/sys/fs/cgroup/cpuset/footest9# echo 0 > cpuset.mems
| root@...an:/sys/fs/cgroup/cpuset/footest9# cat cpuset.mems
|
| root@...an:/sys/fs/cgroup/cpuset/footest9# echo 0 > cpuset.mems
| root@...an:/sys/fs/cgroup/cpuset/footest9# cat cpuset.mems
| 0
| root@...an:/sys/fs/cgroup/cpuset/footest9# cat aa/cpuset.mems
|
| root@...an:/sys/fs/cgroup/cpuset/footest9# echo 0 > aa/cpuset.mems
| root@...an:/sys/fs/cgroup/cpuset/footest9# cat aa/cpuset.mems
| 0
| root@...an:/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@...ocode.com>
Tested-by: Iago López Galeiras <iago@...ocode.com>
Acked-by: Li Zefan <lizefan@...wei.com>
Signed-off-by: Tejun Heo <tj@...nel.org>
Signed-off-by: Kamal Mostafa <kamal@...onical.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists