diff options
author | Jiri Pirko <[email protected]> | 2019-11-08 21:42:43 +0100 |
---|---|---|
committer | David S. Miller <[email protected]> | 2019-11-08 14:11:47 -0800 |
commit | a0c76345e3d3dbc40c39de2e00d15a3b7eef7885 (patch) | |
tree | 5105fde79df0b63a9b5a65df95b338e2f273a141 /tools/perf/scripts/python/intel-pt-events.py | |
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 <[email protected]>
Fixes: 2d8dc5bbf4e7 ("devlink: Add support for reload")
Signed-off-by: Jiri Pirko <[email protected]>
Acked-by: Jakub Kicinski <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/intel-pt-events.py')
0 files changed, 0 insertions, 0 deletions