commit | bf935a78814cc9b96d09f612912178adc964ce9c | [log] [tgz] |
---|---|---|
author | J. Bruce Fields <bfields@fieldses.org> | Tue Jan 20 19:32:59 2009 -0500 |
committer | J. Bruce Fields <bfields@pig.fieldses.org> | Tue Jan 27 17:26:58 2009 -0500 |
tree | 2c23a05d1c4433e309f3434ce8bdd6a5a0ed8838 | |
parent | ce0cf6622c9a6f18c2723ea4bef7616799a1ca39 [diff] [blame] |
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>
diff --git a/fs/nfsd/auth.c b/fs/nfsd/auth.c index c903e04..b860d34 100644 --- a/fs/nfsd/auth.c +++ b/fs/nfsd/auth.c
@@ -49,6 +49,8 @@ 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;