diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-10-26 02:09:02 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-10-27 14:20:00 +0200 |
commit | e63e36076c68748cd359a28c737a12258e56cb46 (patch) | |
tree | 7ea5cb244a0abc47e7a6d10b78418cddb2284cd8 /src/crypto/zinc/curve25519/curve25519-x86_64.c | |
parent | ratelimiter: make hash calls explicit (diff) | |
download | wireguard-monolithic-historical-e63e36076c68748cd359a28c737a12258e56cb46.tar.xz wireguard-monolithic-historical-e63e36076c68748cd359a28c737a12258e56cb46.zip |
timers: it is always reasonable to remove a timer
If struct timer_list has not been setup, it is zeroed, in which case
timer_pending is false, so calling del_timer is safe. Calling del_timer
is also safe on a timer that has already been del_timer'd. And calling
del_timer is safe after a peer is dead, since the whole point of it
being dead is that no more timers are created and all contexts
eventually stop. Finally del_timer uses a lock, which means it's safe to
call it concurrently.
Therefore, we do not need any guards around calls to del_timer. While
we're at it, we can get rid of the old lingering timers_enabled boolean
which wasn't doing anything anyway anymore.
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions