Commit 4f9c4e9d authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] knfsd: Return -EOPNOTSUPP when unknown mechanism name encountered

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

It's better than oopsing.
parent 8b770c1d
...@@ -406,7 +406,11 @@ static int rsc_parse(struct cache_detail *cd, ...@@ -406,7 +406,11 @@ static int rsc_parse(struct cache_detail *cd,
if (len < 0) if (len < 0)
goto out; goto out;
gm = gss_mech_get_by_name(buf); gm = gss_mech_get_by_name(buf);
status = -EOPNOTSUPP;
if (!gm)
goto out;
status = -EINVAL;
/* mech-specific data: */ /* mech-specific data: */
len = qword_get(&mesg, buf, mlen); len = qword_get(&mesg, buf, mlen);
if (len < 0) { if (len < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment