]> git.ipfire.org Git - thirdparty/wireguard-go.git/commit
device: receive: drain decryption queue before exiting RoutineDecryption
authorJason A. Donenfeld <Jason@zx2c4.com>
Thu, 7 Jan 2021 14:56:52 +0000 (15:56 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Thu, 7 Jan 2021 16:08:41 +0000 (17:08 +0100)
commit29b04775856b62213d7bc01937641e2db081d707
tree6044865a29772209154acd59ba7f66274a623403
parent85b495057977e12df378778366a03b508c43f00f
device: receive: drain decryption queue before exiting RoutineDecryption

It's possible for RoutineSequentialReceiver to try to lock an elem after
RoutineDecryption has exited. Before this meant we didn't then unlock
the elem, so the whole program deadlocked.

As well, it looks like the flush code (which is now potentially
unnecessary?) wasn't properly dropping the buffers for the
not-already-dropped case.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
device/device.go
device/receive.go