diff options
author | J. Bruce Fields <bfields@fieldses.org> | 2009-01-21 01:34:22 +0100 |
---|---|---|
committer | J. Bruce Fields <bfields@pig.fieldses.org> | 2009-01-27 23:26:59 +0100 |
commit | b914152a6fbd2cd0441bc293ae8b3f3f1a9407b6 (patch) | |
tree | 52267a4af3d34ebf190d89b279758d7726383412 /fs/nfsd/auth.c | |
parent | nfsd: fix null dereference on error path (diff) | |
download | linux-b914152a6fbd2cd0441bc293ae8b3f3f1a9407b6.tar.xz linux-b914152a6fbd2cd0441bc293ae8b3f3f1a9407b6.zip |
nfsd: fix cred leak on every rpc
Since override_creds() took its own reference on new, we need to release
our own reference.
(Note the put_cred on the return value puts the *old* value of
current->creds, not the new passed-in value).
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd/auth.c')
-rw-r--r-- | fs/nfsd/auth.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfsd/auth.c b/fs/nfsd/auth.c index b860d3484cd7..5573508f707f 100644 --- a/fs/nfsd/auth.c +++ b/fs/nfsd/auth.c @@ -87,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: |