From: Gao feng <gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
To: "Eric W. Biederman" <ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [PATCH] userns: fix return value in map_write
Date: Wed, 10 Oct 2012 12:28:20 +0800 [thread overview]
Message-ID: <5074F964.9000701@cn.fujitsu.com> (raw)
In-Reply-To: <87ipajynr1.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
于 2012年10月10日 12:06, Eric W. Biederman 写道:
> Gao feng <gaofeng@cn.fujitsu.com> writes:
>
>> If the map is already set,we should return -EINVAL.
>
> What makes -EINVAL a better return code?
>
It shouldn't be -EPERM,this will cause user confused.
The first time to write to the uid_map file is success,
and the second time,kernel will return -EPERM.actually
the user has right to write to the uid_map.
And if you think -EPERM is better,it's not necessary
to initialize the value of ret.because we set it to
-EPERM after we get mutex lock id_map_mutex.
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/containers
prev parent reply other threads:[~2012-10-10 4:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-10 3:57 [PATCH] userns: fix return value in map_write Gao feng
[not found] ` <1349841475-19806-1-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2012-10-10 4:06 ` Eric W. Biederman
[not found] ` <87ipajynr1.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-10-10 4:28 ` Gao feng [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=5074F964.9000701@cn.fujitsu.com \
--to=gaofeng-bthxqxjhjhxqfuhtdcdx3a@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
/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