]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
bonding: disable netpoll on enslave failure
authornikolay@redhat.com <nikolay@redhat.com>
Thu, 18 Apr 2013 07:33:37 +0000 (07:33 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Apr 2013 21:48:19 +0000 (17:48 -0400)
slave_disable_netpoll() is not called upon enslave failure which would
lead to a memory leak. Call slave_disable_netpoll() after err_detach as
that's the first error path after enabling netpoll on that slave.

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

index 1137d5eac45099c54b63ef6f3d62ad39272ad39c..ae35b28a39e4ebc2be60619e222937b084bbc0ed 100644 (file)
@@ -1920,6 +1920,7 @@ err_detach:
                write_unlock_bh(&bond->curr_slave_lock);
                read_unlock(&bond->lock);
        }
+       slave_disable_netpoll(new_slave);
 
 err_close:
        slave_dev->priv_flags &= ~IFF_BONDING;