linux/net/dsa
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
..
dsa2.c net: dsa: Remove VLA usage 2018-07-18 15:08:31 -07:00
dsa_priv.h net: dsa: Add Lantiq / Intel GSWIP tag support 2018-09-13 08:14:33 -07:00
dsa.c net: dsa: tag_gswip: Add gswip to dsa_tag_protocol_to_str() 2018-09-17 08:12:11 -07:00
Kconfig net: dsa: Add Lantiq / Intel GSWIP tag support 2018-09-13 08:14:33 -07:00
legacy.c net: dsa: remove redundant null pointer check before put_device 2018-09-17 08:20:11 -07:00
Makefile net: dsa: Add Lantiq / Intel GSWIP tag support 2018-09-13 08:14:33 -07:00
master.c net: dsa: Allow providing PHY statistics from CPU port 2018-04-27 11:53:03 -04:00
port.c dsa: port: Ignore bridge VLAN events 2018-05-31 14:13:43 -04:00
slave.c netpoll: allow cleanup to be synchronous 2018-10-19 17:01:43 -07:00
switch.c net: dsa: Remove VLA usage 2018-07-18 15:08:31 -07:00
tag_brcm.c net: dsa: Move padding into Broadcom tagger 2018-01-05 11:21:31 -05:00
tag_dsa.c net: dsa: {e}dsa: set offload_fwd_mark on received packets 2017-11-11 19:33:11 +09:00
tag_edsa.c net: dsa: {e}dsa: set offload_fwd_mark on received packets 2017-11-11 19:33:11 +09:00
tag_gswip.c net: dsa: Add Lantiq / Intel GSWIP tag support 2018-09-13 08:14:33 -07:00
tag_ksz.c net: dsa: rename dsa_master_get_slave 2017-10-18 12:24:33 +01:00
tag_lan9303.c net: dsa: lan9303: calculate offload_fwd_mark from tag 2017-11-14 21:47:48 +09:00
tag_mtk.c net: dsa: mediatek: combine MediaTek tag with VLAN tag 2017-12-15 10:31:54 -05:00
tag_qca.c net: dsa: rename dsa_master_get_slave 2017-10-18 12:24:33 +01:00
tag_trailer.c net: dsa: add error handling for pskb_trim_rcsum 2018-06-11 14:19:38 -07:00