]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
nfsd: fix cred leak on every rpc
authorJ. Bruce Fields <bfields@fieldses.org>
Wed, 21 Jan 2009 00:34:22 +0000 (19:34 -0500)
committerJ. Bruce Fields <bfields@pig.fieldses.org>
Tue, 27 Jan 2009 22:26:59 +0000 (17:26 -0500)
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>
fs/nfsd/auth.c

index b860d3484cd75157c8a652e23047f79fb18f8ba9..5573508f707fa5cd652da4503049fa6e89c0f9f8 100644 (file)
@@ -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: