Skip to content
Commit 36485707 authored by Jiri Benc's avatar Jiri Benc Committed by David S. Miller
Browse files

[BRIDGE]: fix locking and memory leak in br_add_bridge



There are several bugs in error handling in br_add_bridge:
- when dev_alloc_name fails, allocated net_device is not freed
- unregister_netdev is called when rtnl lock is held
- free_netdev is called before netdev_run_todo has a chance to be run after
  unregistering net_device

Signed-off-by: default avatarJiri Benc <jbenc@suse.cz>
Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8c893ff6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment