Skip to content

Commit

Permalink
Revert "bonding: remove sysfs before removing devices"
Browse files Browse the repository at this point in the history
This reverts commit 4de79c7.

This patch introduces a new bug which causes access to freed memory.
In bond_uninit: list_del(&bond->bond_list);
bond_list is linked in bond_net's dev_list which is freed by
unregister_pernet_subsys.

Signed-off-by: Nikolay Aleksandrov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
[email protected] authored and davem330 committed Apr 8, 2013
1 parent 0f27f57 commit ffcdedb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4902,8 +4902,8 @@ static void __exit bonding_exit(void)

bond_destroy_debugfs();

unregister_pernet_subsys(&bond_net_ops);
rtnl_link_unregister(&bond_link_ops);
unregister_pernet_subsys(&bond_net_ops);

#ifdef CONFIG_NET_POLL_CONTROLLER
/*
Expand Down

0 comments on commit ffcdedb

Please sign in to comment.