]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: primary_slave & curr_active_slave are not cleaned on enslave failure
authornikolay@redhat.com <nikolay@redhat.com>
Thu, 18 Apr 2013 07:33:36 +0000 (07:33 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Apr 2013 21:48:19 +0000 (17:48 -0400)
commit44dfd7d640709e1de01fc3e3045407893b264ba9
tree772296984f4e7f56b8cc0aa4949cfee3582ddc8b
parentf43cc49d115854e47b17af76d365b89585f7d34e
bonding: primary_slave & curr_active_slave are not cleaned on enslave failure

On enslave failure primary_slave can point to new_slave which is to be
freed, and the same applies to curr_active_slave. So check if this is
the case and clean up properly after err_detach because that's the first
error code path after they're set.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c