Commit bf935a78 authored by J. Bruce Fields's avatar J. Bruce Fields Committed by J. Bruce Fields

nfsd: fix null dereference on error path

We're forgetting to check the return value from groups_alloc().
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent ce0cf662
......@@ -49,6 +49,8 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp)
new->fsuid = exp->ex_anon_uid;
new->fsgid = exp->ex_anon_gid;
gi = groups_alloc(0);
if (!gi)
goto oom;
} else if (flags & NFSEXP_ROOTSQUASH) {
if (!new->fsuid)
new->fsuid = exp->ex_anon_uid;
......
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