All of lore.kernel.org
 help / color / mirror / Atom feed
* cpuset: return -EINVAL for legacy non-subset child creation attempt
@ 2015-12-01 15:22 Mike Galbraith
  2015-12-02  1:20 ` Zefan Li
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Galbraith @ 2015-12-01 15:22 UTC (permalink / raw)
  To: Li Zefan; +Cc: lkml

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@gmx.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 &&



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-12-02  3:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-01 15:22 cpuset: return -EINVAL for legacy non-subset child creation attempt Mike Galbraith
2015-12-02  1:20 ` Zefan Li
2015-12-02  3:26   ` Mike Galbraith

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.