diff options
author | 2017-08-17 18:14:39 +0000 | |
---|---|---|
committer | 2017-08-17 18:14:39 +0000 | |
commit | ebe4e985c26c0020a4b4a93d462a369595463146 (patch) | |
tree | ac0aba8497a783200dc245e775b81adeeb27232b /usr.sbin/syspatch | |
parent | Remove duplicate line introduced in rev 1.72. Coverity CID 1452888. (diff) | |
download | wireguard-openbsd-ebe4e985c26c0020a4b4a93d462a369595463146.tar.xz wireguard-openbsd-ebe4e985c26c0020a4b4a93d462a369595463146.zip |
Resolve races with the hfsc_deferred timeout
Since NET_LOCK no longer protects the ioctl path from timeouts
running while ifq configuration is happening, the hfsc_deferred
timeout needs to make sure that the underlying HFSC object is
locked before attempting to reference it. This prevents the race
happening after we release the ifq mutex in ifq_attach but before
hfsc_free disables the timeout.
The second race is possible after hfsc_alloc but before the ifq
mutex gets locked in ifq_attach and a new set of ifq operations
is installed. If hfsc_deferred fires in between, it wouldn't be
able to reschedule itself and will no longer be executed. To
prevent this, the timeout can be established when packets are
enqueued instead of the moment the queue is created.
With input and OK visa
Diffstat (limited to 'usr.sbin/syspatch')
0 files changed, 0 insertions, 0 deletions