diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-10-01 22:39:57 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-10-02 02:45:53 +0200 |
commit | 16931274443b3607b5f863fe14ceebde661a6c3c (patch) | |
tree | e1914255b4ca94b2d45610b30005357be8afeac5 /src/noise.h | |
parent | a0a5dae4f5dc059be6ee3f7a08f103270fbb6623 (diff) |
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.h | 2 |
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 { |