linux/drivers/net/ethernet/cavium
Leon Romanovsky 8d44b5cf60 liquidio: Overcome missing device lock protection in init/remove flows
The liquidio driver is broken by design. It initialize PCI devices
in separate delayed works. It causes to the situation where device lock
is dropped during initialize and remove sequences.

That lock is part of driver/core and needed to protect from races during
init, destroy and bus invocations.

In addition to lack of locking protection, it has incorrect order of
destroy flows and very questionable synchronization scheme based on
atomic_t.

This change doesn't fix that driver but makes sure that rest of the
netdev subsystem doesn't suffer from such basic protection by adding
device_lock over devlink_*() APIs and by moving devlink_register()
to be last command in setup_nic_devices().

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-09-27 16:31:58 +01:00
..
common net: cavium: Fix a bunch of kerneldoc parameter issues 2020-09-09 14:11:58 -07:00
liquidio liquidio: Overcome missing device lock protection in init/remove flows 2021-09-27 16:31:58 +01:00
octeon dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
thunder net: thunderx: Make use of the helper function dev_err_probe() 2021-09-16 13:35:35 +01:00
Kconfig ethernet: fix PTP_1588_CLOCK dependencies 2021-08-13 17:49:05 -07:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00