Re: [PATCH] unshare.2: note another reason EINVAL might be returned

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Shawn

On 07/16/2018 05:25 PM, Shawn Landden wrote:
> ---
>  man2/unshare.2 | 7 +++++++
>  1 file changed, 7 insertions(+)

Thanks for the patch. As far as I can see, this is just a specific example
of a more general point. EINVAL can occur for various CLONE_NEW* flags if
the kernel was not configured to support the corresponding namespace.
As far as I can see, this occurs for PID, network, IPC, user, and UTS
namespaces (but not for mount and cgroup namespaces). Most of these cases
were already documented in clone(2), but not in unshare(2). I've added all
of those cases to unshare(2) now as well.

Thanks,

Michael

> diff --git a/man2/unshare.2 b/man2/unshare.2
> index f0a0f0ec5..1bdb950c3 100644
> --- a/man2/unshare.2
> +++ b/man2/unshare.2
> @@ -288,6 +288,13 @@ was specified in
>  .IR flags ,
>  and the caller is multithreaded.
>  .TP
> +.B EINVAL
> +.BR NET_NS
> +was passed and
> +the kernel was configured without
> +.BR CONFIG_NET_NS .
> +.\" https://github.com/torvalds/linux/blob/master/include/net/net_namespace.h#L181
> +.TP
>  .B ENOMEM
>  Cannot allocate sufficient memory to copy parts of caller's
>  context that need to be unshared.
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux