Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc7a72ac authored by nikolay@redhat.com's avatar nikolay@redhat.com Committed by David S. Miller
Browse files

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: default avatarNikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3c5913b5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1920,6 +1920,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
		write_unlock_bh(&bond->curr_slave_lock);
		read_unlock(&bond->lock);
	}
	slave_disable_netpoll(new_slave);

err_close:
	slave_dev->priv_flags &= ~IFF_BONDING;