From: Mike Galbraith <efault@gmx.de>
To: Li Zefan <lizefan@huawei.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: cpuset: return -EINVAL for legacy non-subset child creation attempt
Date: Tue, 01 Dec 2015 16:22:37 +0100 [thread overview]
Message-ID: <1448983357.3225.148.camel@gmx.de> (raw)
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 &&
next reply other threads:[~2015-12-01 15:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-01 15:22 Mike Galbraith [this message]
2015-12-02 1:20 ` cpuset: return -EINVAL for legacy non-subset child creation attempt Zefan Li
2015-12-02 3:26 ` Mike Galbraith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1448983357.3225.148.camel@gmx.de \
--to=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.