From: NeilBrown <neilb@cse.unsw.edu.au>

It's better than oopsing.


---

 25-akpm/net/sunrpc/auth_gss/svcauth_gss.c |    4 ++++
 1 files changed, 4 insertions(+)

diff -puN net/sunrpc/auth_gss/svcauth_gss.c~knfsd-01-oops-fix net/sunrpc/auth_gss/svcauth_gss.c
--- 25/net/sunrpc/auth_gss/svcauth_gss.c~knfsd-01-oops-fix	2004-03-24 19:21:52.190437072 -0800
+++ 25-akpm/net/sunrpc/auth_gss/svcauth_gss.c	2004-03-24 19:21:52.192436768 -0800
@@ -406,7 +406,11 @@ static int rsc_parse(struct cache_detail
 		if (len < 0)
 			goto out;
 		gm = gss_mech_get_by_name(buf);
+		status = -EOPNOTSUPP;
+		if (!gm)
+			goto out;
 
+		status = -EINVAL;
 		/* mech-specific data: */
 		len = qword_get(&mesg, buf, mlen);
 		if (len < 0) {

_