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 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html