diff options
author | Jiri Pirko <jiri@mellanox.com> | 2019-11-08 21:42:43 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-08 14:11:47 -0800 |
commit | a0c76345e3d3dbc40c39de2e00d15a3b7eef7885 (patch) | |
tree | 5105fde79df0b63a9b5a65df95b338e2f273a141 /tools/time | |
parent | f95e6c9c461709a1faa37b20c4d3eb50253f616a (diff) |
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 10 > /sys/bus/netdevsim/new_device
devlink dev reload netdevsim/netdevsim10 &
echo 10 > /sys/bus/netdevsim/del_device
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>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/time')
0 files changed, 0 insertions, 0 deletions