OpenCloudOS-Kernel/drivers/net/team
Debabrata Banerjee c9fbd71f73 netpoll: allow cleanup to be synchronous
This fixes a problem introduced by:
commit 2cde6acd49 ("netpoll: Fix __netpoll_rcu_free so that it can hold the rtnl lock")

When using netconsole on a bond, __netpoll_cleanup can asynchronously
recurse multiple times, each __netpoll_free_async call can result in
more __netpoll_free_async's. This means there is now a race between
cleanup_work queues on multiple netpoll_info's on multiple devices and
the configuration of a new netpoll. For example if a netconsole is set
to enable 0, reconfigured, and enable 1 immediately, this netconsole
will likely not work.

Given the reason for __netpoll_free_async is it can be called when rtnl
is not locked, if it is locked, we should be able to execute
synchronously. It appears to be locked everywhere it's called from.

Generalize the design pattern from the teaming driver for current
callers of __netpoll_free_async.

CC: Neil Horman <nhorman@tuxdriver.com>
CC: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Debabrata Banerjee <dbanerje@akamai.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-19 17:01:43 -07:00
..
Kconfig team: introduce random mode 2013-03-06 14:55:20 -05:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
team.c netpoll: allow cleanup to be synchronous 2018-10-19 17:01:43 -07:00
team_mode_activebackup.c team: add macro MODULE_ALIAS_TEAM_MODE for team mode alias 2017-06-02 10:20:49 -04:00
team_mode_broadcast.c team: add macro MODULE_ALIAS_TEAM_MODE for team mode alias 2017-06-02 10:20:49 -04:00
team_mode_loadbalance.c team: fall back to hash if table entry is empty 2017-09-19 16:18:58 -07:00
team_mode_random.c team: add macro MODULE_ALIAS_TEAM_MODE for team mode alias 2017-06-02 10:20:49 -04:00
team_mode_roundrobin.c team: add macro MODULE_ALIAS_TEAM_MODE for team mode alias 2017-06-02 10:20:49 -04:00