linux_dsm_epyc7002/drivers/net/ethernet/mellanox/mlx4
Jiri Pirko 5a508a254b devlink: disallow reload operation during device cleanup
There is a race between driver code that does setup/cleanup of device
and devlink reload operation that in some drivers works with the same
code. Use after free could we easily obtained by running:

while true; do
        echo "0000:00:10.0" >/sys/bus/pci/drivers/mlxsw_spectrum2/bind
        devlink dev reload pci/0000:00:10.0 &
        echo "0000:00:10.0" >/sys/bus/pci/drivers/mlxsw_spectrum2/unbind
done

Fix this by enabling reload only after setup of device is complete and
disabling it at the beginning of the cleanup process.

Reported-by: Ido Schimmel <idosch@mellanox.com>
Fixes: 2d8dc5bbf4 ("devlink: Add support for reload")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-11-09 19:38:36 -08:00
..
alloc.c
catas.c mlx4: Split restart_one into two functions 2019-09-13 22:11:14 +02:00
cmd.c drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
cq.c
crdump.c devlink: remove pointless data_len arg from region snapshot create 2019-08-09 11:21:46 -07:00
en_clock.c
en_cq.c
en_dcb_nl.c
en_ethtool.c net/mlx4_en: ethtool: make array modes static const, makes object smaller 2019-09-10 09:29:15 +01:00
en_main.c
en_netdev.c mlx4/en_netdev: allow offloading VXLAN over VLAN 2019-07-27 14:22:32 -07:00
en_port.c
en_port.h
en_resources.c
en_rx.c net/mlx4_en: fix a memory leak bug 2019-08-13 19:42:43 -07:00
en_selftest.c
en_tx.c net: Use skb accessors in network drivers 2019-07-22 20:47:56 -07:00
eq.c ethernet: remove redundant memset 2019-07-15 11:06:27 -07:00
fw_qos.c
fw_qos.h
fw.c
fw.h
icm.c
icm.h
intf.c
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
main.c devlink: disallow reload operation during device cleanup 2019-11-09 19:38:36 -08:00
Makefile
mcg.c net/mlx4_core: Change the error print to info print 2019-05-14 15:38:59 -07:00
mlx4_en.h net: remove 'fallback' argument from dev->ndo_select_queue() 2019-03-20 11:18:55 -07:00
mlx4_stats.h
mlx4.h mlx4: Split restart_one into two functions 2019-09-13 22:11:14 +02:00
mr.c
pd.c
port.c net/mlx4_en: ethtool, Remove unsupported SFP EEPROM high pages query 2019-05-20 11:33:57 -07:00
profile.c
qp.c
reset.c
resource_tracker.c net/mlx4_core: Dynamically set guaranteed amount of counters per VF 2019-10-29 16:29:43 -07:00
sense.c
srq.c