summaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@fieldses.org>2009-01-21 01:32:59 +0100
committerJ. Bruce Fields <bfields@pig.fieldses.org>2009-01-27 23:26:58 +0100
commitbf935a78814cc9b96d09f612912178adc964ce9c (patch)
tree2c23a05d1c4433e309f3434ce8bdd6a5a0ed8838 /fs/nfsd
parentnfs: note that CONFIG_SUNRPC_XPRT_RDMA turns on server side support too (diff)
downloadlinux-bf935a78814cc9b96d09f612912178adc964ce9c.tar.xz
linux-bf935a78814cc9b96d09f612912178adc964ce9c.zip
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>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/auth.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/auth.c b/fs/nfsd/auth.c
index c903e04aa217..b860d3484cd7 100644
--- a/fs/nfsd/auth.c
+++ b/fs/nfsd/auth.c
@@ -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;