lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 14 Dec 2007 14:03:05 +0800
From:	"guanxun mu" <lyxmoo@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: [PATCH] AS apple talk protocol register_snap_client failed

[PACTH APPLETALK]

This patch update proto_init process when register_snap_client failed

Signed-off-by: Michale Moore <lyxmoo@...il.com>

diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c
index 6c5c6dc..d6573f6 100644
--- a/net/appletalk/aarp.c
+++ b/net/appletalk/aarp.c
@@ -873,7 +873,10 @@ void __init aarp_proto_init(void)
 {
        aarp_dl = register_snap_client(aarp_snap_id, aarp_rcv);
        if (!aarp_dl)
-               printk(KERN_CRIT "Unable to register AARP with SNAP.\n");
+       {
+               printk(KERN_CRIT "Unable to register AARP with SNAP.\n");
+               return;
+       }
        init_timer(&aarp_timer);
        aarp_timer.function = aarp_expire_timeout;
        aarp_timer.data     = 0;
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
index e0d37d6..ce9929c 100644
--- a/net/appletalk/ddp.c
+++ b/net/appletalk/ddp.c
@@ -1894,9 +1894,9 @@ static int __init atalk_init(void)

        (void)sock_register(&atalk_family_ops);
        ddp_dl = register_snap_client(ddp_snap_id, atalk_rcv);
-       if (!ddp_dl)
-               printk(atalk_err_snap);
-
+       if (!ddp_dl)
+               goto failed;
+
        dev_add_pack(&ltalk_packet_type);
        dev_add_pack(&ppptalk_packet_type);

@@ -1906,7 +1906,13 @@ static int __init atalk_init(void)
        atalk_register_sysctl();
 out:
        return rc;
+failed:
+       printk(atalk_err_snap);
+       sock_unregister(PF_APPLETALK);
+       proto_unregister(&ddp_proto);
+       return -1;
 }
+
 module_init(atalk_init);

 /*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ