diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/keys/keyring-type.h | 17 | ||||
-rw-r--r-- | include/linux/key.h | 13 |
2 files changed, 10 insertions, 20 deletions
diff --git a/include/keys/keyring-type.h b/include/keys/keyring-type.h index cf49159b0e3a..fca5c62340a4 100644 --- a/include/keys/keyring-type.h +++ b/include/keys/keyring-type.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* Keyring key type | 1 | /* Keyring key type |
2 | * | 2 | * |
3 | * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved. | 3 | * Copyright (C) 2008, 2013 Red Hat, Inc. All Rights Reserved. |
4 | * Written by David Howells (dhowells@redhat.com) | 4 | * Written by David Howells (dhowells@redhat.com) |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or | 6 | * This program is free software; you can redistribute it and/or |
@@ -13,19 +13,6 @@ | |||
13 | #define _KEYS_KEYRING_TYPE_H | 13 | #define _KEYS_KEYRING_TYPE_H |
14 | 14 | ||
15 | #include <linux/key.h> | 15 | #include <linux/key.h> |
16 | #include <linux/rcupdate.h> | 16 | #include <linux/assoc_array.h> |
17 | |||
18 | /* | ||
19 | * the keyring payload contains a list of the keys to which the keyring is | ||
20 | * subscribed | ||
21 | */ | ||
22 | struct keyring_list { | ||
23 | struct rcu_head rcu; /* RCU deletion hook */ | ||
24 | unsigned short maxkeys; /* max keys this list can hold */ | ||
25 | unsigned short nkeys; /* number of keys currently held */ | ||
26 | unsigned short delkey; /* key to be unlinked by RCU */ | ||
27 | struct key __rcu *keys[0]; | ||
28 | }; | ||
29 | |||
30 | 17 | ||
31 | #endif /* _KEYS_KEYRING_TYPE_H */ | 18 | #endif /* _KEYS_KEYRING_TYPE_H */ |
diff --git a/include/linux/key.h b/include/linux/key.h index ef596c7af585..2417f789d29b 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/sysctl.h> | 22 | #include <linux/sysctl.h> |
23 | #include <linux/rwsem.h> | 23 | #include <linux/rwsem.h> |
24 | #include <linux/atomic.h> | 24 | #include <linux/atomic.h> |
25 | #include <linux/assoc_array.h> | ||
25 | 26 | ||
26 | #ifdef __KERNEL__ | 27 | #ifdef __KERNEL__ |
27 | #include <linux/uidgid.h> | 28 | #include <linux/uidgid.h> |
@@ -196,11 +197,13 @@ struct key { | |||
196 | * whatever | 197 | * whatever |
197 | */ | 198 | */ |
198 | union { | 199 | union { |
199 | unsigned long value; | 200 | union { |
200 | void __rcu *rcudata; | 201 | unsigned long value; |
201 | void *data; | 202 | void __rcu *rcudata; |
202 | struct keyring_list __rcu *subscriptions; | 203 | void *data; |
203 | } payload; | 204 | } payload; |
205 | struct assoc_array keys; | ||
206 | }; | ||
204 | }; | 207 | }; |
205 | 208 | ||
206 | extern struct key *key_alloc(struct key_type *type, | 209 | extern struct key *key_alloc(struct key_type *type, |