diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-27 16:07:44 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-27 16:07:44 -0800 |
commit | 843c04a0f63c74c6424e4b7d1ab85223b1ecf740 (patch) | |
tree | c7f6b771ccc47a249b3c607471b3fbd1ad7ab7d2 /fs/nfsd/auth.c | |
parent | b00ecabf1d00f6c164aee62703df5dae7ac79894 (diff) | |
parent | fa82a491275a613b15489aab4b99acecb00958d3 (diff) |
Merge branch 'for-2.6.29' of git://linux-nfs.org/~bfields/linux
* 'for-2.6.29' of git://linux-nfs.org/~bfields/linux:
nfsd: only set file_lock.fl_lmops in nfsd4_lockt if a stateowner is found
nfsd: fix cred leak on every rpc
nfsd: fix null dereference on error path
nfs: note that CONFIG_SUNRPC_XPRT_RDMA turns on server side support too
update port number in NFS/RDMA documentation
Diffstat (limited to 'fs/nfsd/auth.c')
-rw-r--r-- | fs/nfsd/auth.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfsd/auth.c b/fs/nfsd/auth.c index c903e04aa21..5573508f707 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; @@ -85,6 +87,7 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp) new->cap_effective = cap_raise_nfsd_set(new->cap_effective, new->cap_permitted); put_cred(override_creds(new)); + put_cred(new); return 0; oom: |