]> git.baikalelectronics.ru Git - kernel.git/commit
[BOND]: Fix bond_init() error path handling.
authorFlorin Malita <fmalita@gmail.com>
Sun, 18 Sep 2005 07:24:12 +0000 (00:24 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 18 Sep 2005 07:24:12 +0000 (00:24 -0700)
commit469392e76cb8ed53a89d861e763c043b1f71bb00
tree0e5b000311e1729892c4595c0dbe106b987d577e
parent86b0d91d63e95b4e3da4580a8f36cfe242e425ba
[BOND]: Fix bond_init() error path handling.

From: Florin Malita <fmalita@gmail.com>

bond_init() is not releasing rtnl_sem after register_netdevice() and before
calling unregister_netdevice() (from bond_free_all()) in the exception
path.  As the device registration is not completed (dev->reg_state ==
NETREG_REGISTERING), the call to unregister_netdevice() triggers
BUG_ON(dev->reg_state != NETREG_REGISTERED).

Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c