From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Jeff Layton <jlayton@redhat.com>
Cc: linux-nfs@vger.kernel.org, nfsv4@linux-nfs.org
Subject: Re: [PATCH] sunrpc: on successful gss error pipe write, don't return error (try #2)
Date: Fri, 18 Dec 2009 15:56:52 -0500 [thread overview]
Message-ID: <1261169812.3420.68.camel@localhost> (raw)
In-Reply-To: <20091218153841.1fbd5357@tlielax.poochiereds.net>
On Fri, 2009-12-18 at 15:38 -0500, Jeff Layton wrote:
> Well, I'd like to think that we'd always get the lower layers right, but
> I know better :). We probably ought to code defensively here and account
> for the possibility that this function could return a different error
> due to an inadvertent change in a lower function.
>
> If the "bad" error is transient then -EAGAIN would probably just paper
> over it. If it's not transient then the mount would hang. -EACCES is a
> nice hard error, but could be confused with a "real" -EACCES. We could
> BUG() in that case if we're sure it'd be a real bug...
switch (err) {
case -EACCES:
gss_msg->msg.errno = -EACCES;
break;
case -EFAULT:
case -ENOMEM:
case -EINVAL:
case -ENOSYS:
gss_msg->msg.errno = -EAGAIN;
break;
default:
BUG();
}
Yup. That looks good to me... ..and with the fixes to
gss_import_sec_context_kerberos and gss_import_sec_context, it will
actually be correct too.
BTW: get_key() returns EINVAL on error, so that does indeed need to be
supported in the above list.
Trond
next prev parent reply other threads:[~2009-12-18 20:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-18 16:27 [PATCH] sunrpc: on successful gss error pipe write, don't return error (try #2) Jeff Layton
2009-12-18 19:05 ` Trond Myklebust
2009-12-18 20:13 ` Jeff Layton
2009-12-18 20:24 ` Trond Myklebust
2009-12-18 20:38 ` Jeff Layton
2009-12-18 20:56 ` Trond Myklebust [this message]
2009-12-18 21:02 ` Trond Myklebust
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=1261169812.3420.68.camel@localhost \
--to=trond.myklebust@fys.uio.no \
--cc=jlayton@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=nfsv4@linux-nfs.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;
as well as URLs for NNTP newsgroup(s).