Commit 4de79c7
bonding: remove sysfs before removing devices
We have a race condition if we try to rmmod bonding and simultaneously add
a bond master through sysfs. In bonding_exit() we first remove the devices
(through rtnl_link_unregister() ) and only after that we remove the sysfs.
If we manage to add a device through sysfs after that the devices were
removed - we'll end up with that device/sysfs structure and with the module
unloaded.
Fix this by first removing the sysfs and only after that calling
rtnl_link_unregister().
Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 31d1670 commit 4de79c7
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4902 | 4902 | | |
4903 | 4903 | | |
4904 | 4904 | | |
4905 | | - | |
4906 | 4905 | | |
| 4906 | + | |
4907 | 4907 | | |
4908 | 4908 | | |
4909 | 4909 | | |
| |||
0 commit comments