mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 06:56:44 +07:00
a0c76345e3
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:
|
||
---|---|---|
.. | ||
bpf.c | ||
bus.c | ||
dev.c | ||
fib.c | ||
health.c | ||
ipsec.c | ||
Makefile | ||
netdev.c | ||
netdevsim.h | ||
sdev.c |