Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cb276805803b8e0616159d80a441ab26a931ada4
Commit:     cb276805803b8e0616159d80a441ab26a931ada4
Parent:     d1709e477f203c0538f94c4d1ac981d08325eebf
Author:     J. Bruce Fields <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 23 18:43:52 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Jul 24 12:24:58 2007 -0700

    nfsd: fix possible oops on re-insertion of rpcsec_gss modules
    
    The handling of the re-registration case is wrong here; the "test" that was
    returned from auth_domain_lookup will not be used again, so that reference
    should be put.  And auth_domain_lookup never did anything with "new" in
    this case, so we should just clean it up ourself.
    
    Thanks to Akinobu Mita for bug report, analysis, and testing.
    
    Cc: Akinobu Mita <[EMAIL PROTECTED]>
    Signed-off-by: "J. Bruce Fields" <[EMAIL PROTECTED]>
    Cc: Neil Brown <[EMAIL PROTECTED]>
    Cc: Trond Myklebust <[EMAIL PROTECTED]>
    Cc: <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 net/sunrpc/auth_gss/svcauth_gss.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/net/sunrpc/auth_gss/svcauth_gss.c 
b/net/sunrpc/auth_gss/svcauth_gss.c
index 4906975..dc2f41e 100644
--- a/net/sunrpc/auth_gss/svcauth_gss.c
+++ b/net/sunrpc/auth_gss/svcauth_gss.c
@@ -769,11 +769,12 @@ svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char 
* name)
        new->h.flavour = &svcauthops_gss;
        new->pseudoflavor = pseudoflavor;
 
+       stat = 0;
        test = auth_domain_lookup(name, &new->h);
-       if (test != &new->h) { /* XXX Duplicate registration? */
-               auth_domain_put(&new->h);
-               /* dangling ref-count... */
-               goto out;
+       if (test != &new->h) { /* Duplicate registration */
+               auth_domain_put(test);
+               kfree(new->h.name);
+               goto out_free_dom;
        }
        return 0;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to