aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/noise.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-10-01 22:39:57 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-10-02 02:45:53 +0200
commitef9b40e02c25f1f11fbafd22ab3d867ab22f4fd2 (patch)
tree4274baf210ec62688c1bf68513fffe0290754b72 /src/noise.h
parentwg-quick: check permissions of parent directory (diff)
downloadwireguard-monolithic-historical-ef9b40e02c25f1f11fbafd22ab3d867ab22f4fd2.tar.xz
wireguard-monolithic-historical-ef9b40e02c25f1f11fbafd22ab3d867ab22f4fd2.zip
noise: use spinlock for rotating keys
This should only really be contended in extremely exceptional cases, so changing from a mutex to a spinlock is likely fine.
Diffstat (limited to 'src/noise.h')
-rw-r--r--src/noise.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/noise.h b/src/noise.h
index 2024b80..f6c68ea 100644
--- a/src/noise.h
+++ b/src/noise.h
@@ -49,7 +49,7 @@ struct noise_keypairs {
struct noise_keypair __rcu *current_keypair;
struct noise_keypair __rcu *previous_keypair;
struct noise_keypair __rcu *next_keypair;
- struct mutex keypair_update_lock;
+ spinlock_t keypair_update_lock;
};
struct noise_static_identity {