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
| ||
|
Date: Fri, 30 Oct 2009 09:06:00 +0100 From: Patrick McHardy <kaber@...sh.net> To: "Eric W. Biederman" <ebiederm@...ssion.com> CC: David Miller <davem@...emloft.net>, netdev@...r.kernel.org, Jay Vosburgh <fubar@...ibm.com>, "Eric W. Biederman" <ebiederm@...stanetworks.com> Subject: Re: [PATCH 5/6] bond: Implement a basic set of rtnl link ops Eric W. Biederman wrote: > @@ -5115,6 +5118,10 @@ static int __init bonding_init(void) > > bond_create_proc_dir(); > > + res = rtnl_link_register(&bond_link_ops); > + if (res) > + goto err; The error handling looks wrong, at err: you call rtnl_link_unregister() after rtnl_link_register() failed. > + > for (i = 0; i < max_bonds; i++) { > res = bond_create(NULL); > if (res) > @@ -5128,14 +5135,12 @@ static int __init bonding_init(void) > register_netdevice_notifier(&bond_netdev_notifier); > register_inetaddr_notifier(&bond_inetaddr_notifier); > bond_register_ipv6_notifier(); > - > - goto out; > -err: > - rtnl_lock(); > - bond_free_all(); > - rtnl_unlock(); > out: > return res; > +err: > + rtnl_link_unregister(&bond_link_ops); > + bond_destroy_proc_dir(); > + goto out; > > } -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists