lkml.org 
[lkml]   [2015]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: cpuset: return -EINVAL for legacy non-subset child creation attempt
From
Date
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



\
 
 \ /
  Last update: 2015-12-02 04:41    [W:0.063 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site