From 16931274443b3607b5f863fe14ceebde661a6c3c Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 1 Oct 2017 22:39:57 +0200 Subject: 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 --- src/noise.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/noise.h') 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 { -- cgit v1.2.3