diff options
author | nikolay@redhat.com <nikolay@redhat.com> | 2013-04-18 09:33:37 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-19 23:48:19 +0200 |
commit | fc7a72ac86e2956dd405b0c604fea45a2702f567 (patch) | |
tree | 5e8e21c7e017637ca9a73e87155895f221253066 /drivers | |
parent | bonding: primary_slave & curr_active_slave are not cleaned on enslave failure (diff) | |
download | linux-fc7a72ac86e2956dd405b0c604fea45a2702f567.tar.xz linux-fc7a72ac86e2956dd405b0c604fea45a2702f567.zip |
bonding: disable netpoll on enslave failure
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 1137d5eac450..ae35b28a39e4 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -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; |