nfsd: fix null dereference on error path
We're forgetting to check the return value from groups_alloc(). Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
This commit is contained in:
parent
ce0cf6622c
commit
bf935a7881
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue