Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

nikolay@redhat.com and committed by
David S. Miller
ffcdedb6 0f27f575

+1 -1
+1 -1
drivers/net/bonding/bond_main.c
··· 4902 4902 4903 4903 bond_destroy_debugfs(); 4904 4904 4905 - unregister_pernet_subsys(&bond_net_ops); 4906 4905 rtnl_link_unregister(&bond_link_ops); 4906 + unregister_pernet_subsys(&bond_net_ops); 4907 4907 4908 4908 #ifdef CONFIG_NET_POLL_CONTROLLER 4909 4909 /*