mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: Zefan Li <lizefan@huawei.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: cpuset: return -EINVAL for legacy non-subset child creation attempt
Date: Wed, 02 Dec 2015 04:26:42 +0100	[thread overview]
Message-ID: <1449026802.3304.9.camel@gmx.de> (raw)
In-Reply-To: <565E4744.9020308@huawei.com>

On Wed, 2015-12-02 at 09:20 +0800, Zefan Li wrote:
> On 2015/12/1 23:22, Mike Galbraith wrote:
> > 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.
> >
> 
> It's sometimes arguable which errno should be used. In this case I don't
> see why we can't use EACCES. It's even documented in man page.
> 
>         EACCES Attempted to add, using write(2), a CPU  or  memory  node  to  a
>                cpuset, when that CPU or memory node was not already in its par-
>                ent.
> 
> Let's see another example. In mmap manual:
> 
> 	EACCES A  file descriptor refers to a non-regular file.
> 
> We can argue fd of a non-regular file is an invalid configuration, but
> here we return EACCES.

Ok, works for me (official -ENOPE -> gripee), thanks.

	-Mike


      reply	other threads:[~2015-12-02  3:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-01 15:22 Mike Galbraith
2015-12-02  1:20 ` Zefan Li
2015-12-02  3:26   ` Mike Galbraith [this message]

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=1449026802.3304.9.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome