From: J. Bruce Fields Date: Wed, 21 Jan 2009 00:32:59 +0000 (-0500) Subject: nfsd: fix null dereference on error path X-Git-Tag: v2.6.29-rc3~7^2~2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=bf935a78814cc9b96d09f612912178adc964ce9c;p=linux-2.6-omap-h63xx.git nfsd: fix null dereference on error path We're forgetting to check the return value from groups_alloc(). Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/auth.c b/fs/nfsd/auth.c index c903e04aa21..b860d3484cd 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;