[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1448983357.3225.148.camel@gmx.de>
Date: Tue, 01 Dec 2015 16:22:37 +0100
From: Mike Galbraith <efault@....de>
To: Li Zefan <lizefan@...wei.com>
Cc: lkml <linux-kernel@...r.kernel.org>
Subject: cpuset: return -EINVAL for legacy non-subset child creation attempt
A legacy hierarchy child set that is not a subset of its parent is not
a permissions issue, it's an invalid configuration. Return -EINVAL.
Signed-off-by: Mike Galbraith <efault@....de>
---
kernel/cpuset.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -472,7 +472,7 @@ static int validate_change(struct cpuset
par = parent_cs(cur);
/* On legacy hiearchy, we must be a subset of our parent cpuset. */
- ret = -EACCES;
+ ret = -EINVAL;
if (!cgroup_subsys_on_dfl(cpuset_cgrp_subsys) &&
!is_cpuset_subset(trial, par))
goto out;
@@ -481,7 +481,6 @@ static int validate_change(struct cpuset
* If either I or some sibling (!= me) is exclusive, we can't
* overlap
*/
- ret = -EINVAL;
cpuset_for_each_child(c, css, par) {
if ((is_cpu_exclusive(trial) || is_cpu_exclusive(c)) &&
c != cur &&
--
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