aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events/tcp.h
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2019-11-09 11:29:46 +0100
committerDavid S. Miller <davem@davemloft.net>2019-11-09 19:38:36 -0800
commit5a508a254bed9a2e36a5fb96c9065532a6bf1e9c (patch)
treede6176184a5f1cb07d9875e88f695ab503102935 /include/trace/events/tcp.h
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (diff)
downloadlinux-dev-5a508a254bed9a2e36a5fb96c9065532a6bf1e9c.tar.xz
linux-dev-5a508a254bed9a2e36a5fb96c9065532a6bf1e9c.zip
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: 2d8dc5bbf4e7 ("devlink: Add support for reload") Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions