aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/keys/keyring-type.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2012-05-11 10:56:56 +0100
committerDavid Howells <dhowells@redhat.com>2012-05-11 10:56:56 +0100
commit233e4735f2a45d9e641c2488b8d7afeb1f377dac (patch)
treed273536aaea91cf4817dd305450f327ebb37059f /include/keys/keyring-type.h
parentKEYS: Perform RCU synchronisation on keys prior to key destruction (diff)
downloadwireguard-linux-233e4735f2a45d9e641c2488b8d7afeb1f377dac.tar.xz
wireguard-linux-233e4735f2a45d9e641c2488b8d7afeb1f377dac.zip
KEYS: Permit in-place link replacement in keyring list
Make use of the previous patch that makes the garbage collector perform RCU synchronisation before destroying defunct keys. Key pointers can now be replaced in-place without creating a new keyring payload and replacing the whole thing as the discarded keys will not be destroyed until all currently held RCU read locks are released. If the keyring payload space needs to be expanded or contracted, then a replacement will still need allocating, and the original will still have to be freed by RCU. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'include/keys/keyring-type.h')
-rw-r--r--include/keys/keyring-type.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/keys/keyring-type.h b/include/keys/keyring-type.h
index 843f872a4b63..cf49159b0e3a 100644
--- a/include/keys/keyring-type.h
+++ b/include/keys/keyring-type.h
@@ -24,7 +24,7 @@ struct keyring_list {
unsigned short maxkeys; /* max keys this list can hold */
unsigned short nkeys; /* number of keys currently held */
unsigned short delkey; /* key to be unlinked by RCU */
- struct key *keys[0];
+ struct key __rcu *keys[0];
};