summaryrefslogtreecommitdiffstatshomepage
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
commit16931274443b3607b5f863fe14ceebde661a6c3c (patch)
treee1914255b4ca94b2d45610b30005357be8afeac5 /src/noise.h
parentdebug: add better insert target (diff)
downloadwireguard-linux-compat-16931274443b3607b5f863fe14ceebde661a6c3c.tar.xz
wireguard-linux-compat-16931274443b3607b5f863fe14ceebde661a6c3c.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. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
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 {