netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Revert "bonding: remove sysfs before removing devices"
@ 2013-04-06 10:54 Nikolay Aleksandrov
  2013-04-06 10:54 ` [PATCH 2/2] bonding: fix bonding_masters race condition in bond unloading Nikolay Aleksandrov
  2013-04-08 20:45 ` [PATCH 1/2] Revert "bonding: remove sysfs before removing devices" David Miller
  0 siblings, 2 replies; 9+ messages in thread
From: Nikolay Aleksandrov @ 2013-04-06 10:54 UTC (permalink / raw)
  To: netdev; +Cc: andy, fubar, davem, vfalico

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 <nikolay@redhat.com>
---
 drivers/net/bonding/bond_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 171b10f..a51241b 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
 	/*
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-04-08 20:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-06 10:54 [PATCH 1/2] Revert "bonding: remove sysfs before removing devices" Nikolay Aleksandrov
2013-04-06 10:54 ` [PATCH 2/2] bonding: fix bonding_masters race condition in bond unloading Nikolay Aleksandrov
2013-04-06 13:50   ` Veaceslav Falico
2013-04-08  8:30     ` Veaceslav Falico
2013-04-08  9:15       ` Nikolay Aleksandrov
2013-04-08 10:08         ` Veaceslav Falico
2013-04-08  9:24   ` Veaceslav Falico
2013-04-08 20:45   ` David Miller
2013-04-08 20:45 ` [PATCH 1/2] Revert "bonding: remove sysfs before removing devices" David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).