The patch titled auth_gss: unregister gss_domain when unloading module has been added to the -mm tree. Its filename is auth_gss-unregister-gss_domain-when-unloading-module.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: auth_gss: unregister gss_domain when unloading module From: Akinobu Mita <akinobu.mita@xxxxxxxxx> Reloading rpcsec_gss_krb5 or rpcsec_gss_spkm3 hit duplicate registration in svcauth_gss_register_pseudoflavor(). (If DEBUG_PAGEALLOC is enabled, oops will happen at auth_domain_put() --> hlist_del() with uninitialized hlist_node) svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name) { ... test = auth_domain_lookup(name, &new->h); if (test != &new->h) { /* XXX Duplicate registration? */ auth_domain_put(&new->h); /* dangling ref-count... */ ... } This patch unregisters gss_domain and free it when unloading modules (rpcsec_gss_krb5 or rpcsec_gss_spkm3 module call gss_mech_unregister()) Cc: Andy Adamson <andros@xxxxxxxxxxxxxx> Cc: "J. Bruce Fields" <bfields@xxxxxxxxxxxxxx> Cc: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx> Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- net/sunrpc/auth_gss/gss_mech_switch.c | 4 ++++ net/sunrpc/auth_gss/svcauth_gss.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff -puN net/sunrpc/auth_gss/gss_mech_switch.c~auth_gss-unregister-gss_domain-when-unloading-module net/sunrpc/auth_gss/gss_mech_switch.c --- a/net/sunrpc/auth_gss/gss_mech_switch.c~auth_gss-unregister-gss_domain-when-unloading-module +++ a/net/sunrpc/auth_gss/gss_mech_switch.c @@ -59,7 +59,11 @@ gss_mech_free(struct gss_api_mech *gm) int i; for (i = 0; i < gm->gm_pf_num; i++) { + struct auth_domain *dom; + pf = &gm->gm_pfs[i]; + dom = auth_domain_find(pf->auth_domain_name); + auth_domain_put(dom); kfree(pf->auth_domain_name); pf->auth_domain_name = NULL; } diff -puN net/sunrpc/auth_gss/svcauth_gss.c~auth_gss-unregister-gss_domain-when-unloading-module net/sunrpc/auth_gss/svcauth_gss.c --- a/net/sunrpc/auth_gss/svcauth_gss.c~auth_gss-unregister-gss_domain-when-unloading-module +++ a/net/sunrpc/auth_gss/svcauth_gss.c @@ -765,9 +765,9 @@ svcauth_gss_register_pseudoflavor(u32 ps test = auth_domain_lookup(name, &new->h); if (test != &new->h) { /* XXX Duplicate registration? */ - auth_domain_put(&new->h); - /* dangling ref-count... */ - goto out; + WARN_ON(1); + kfree(new->h.name); + goto out_free_dom; } return 0; _ Patches currently in -mm which might be from akinobu.mita@xxxxxxxxx are sc1200wdt-fix-missing-pnp_unregister_driver.patch isdn-gigaset-avoid-cs-dev-null-pointer-dereference.patch acpi-fix-single-linked-list-manipulation.patch debugfs-check-return-value-correctly.patch lightning-return-proper-return-code.patch git-mtd.patch n2-fix-confusing-error-code.patch tokenring-fix-module_init-error-handling.patch gss_spkm3-fix-error-handling-in-module-init.patch auth_gss-unregister-gss_domain-when-unloading-module.patch git-pcmcia.patch pci-fix-__pci_register_driver-error-handling.patch acpiphp-fix-missing-acpiphp_glue_exit.patch edac_mc-fix-error-handling.patch paride-return-proper-error-code.patch bit-revese-library.patch crc32-replace-bitreverse-by-bitrev32.patch video-use-bitrev8.patch net-use-bitrev8.patch isdn-hisax-use-bitrev8.patch atm-ambassador-use-bitrev8.patch isdn-gigaset-use-bitrev8.patch isdn-fix-missing-unregister_capi_driver.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html