From: nikolay@redhat.com Date: Sat, 6 Apr 2013 00:54:37 +0000 (+0000) Subject: Revert "bonding: remove sysfs before removing devices" X-Git-Tag: submit/tizen_common/20140905.094502~3173^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ffcdedb667b6db8ee31c7efa76a3ec59d9c3b0fc;p=sdk%2Femulator%2Femulator-kernel.git Revert "bonding: remove sysfs before removing devices" This reverts commit 4de79c737b200492195ebc54a887075327e1ec1d. 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 171b10f167a5..a51241b2e621 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -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 /*