]> git.ipfire.org Git - thirdparty/wireguard-go.git/commit
device: wait for and lock ipc operations during close
authorJames Tucker <jftucker@gmail.com>
Fri, 5 May 2023 23:11:38 +0000 (16:11 -0700)
committerJason A. Donenfeld <Jason@zx2c4.com>
Tue, 27 Jun 2023 15:43:35 +0000 (17:43 +0200)
commitb7cd547315bed421a648d0a0f1ee5a0fc1b1151e
tree1fb25dfb160f065b54a036de6e8e111271571992
parent052af4a8072bbbd3bfe7edf46fe3c1b350f71f08
device: wait for and lock ipc operations during close

If an IPC operation is in flight while close starts, it is possible for
both processes to deadlock. Prevent this by taking the IPC lock at the
start of close and for the duration.

Signed-off-by: James Tucker <jftucker@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
device/device.go