aboutsummaryrefslogtreecommitdiffstats
path: root/security/keys/internal.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2010-04-30 09:32:39 -0400
committerJames Morris <jmorris@namei.org>2010-05-06 08:25:02 -0400
commitf70e2e06196ad4c1c762037da2f75354f6c16b81 (patch)
tree9632a1e655efb684c87f8c7be6d091fbb1a430e7 /security/keys/internal.h
parent043b4d40f53131c5f72eca2a46555fe35328a930 (diff)
KEYS: Do preallocation for __key_link()
Do preallocation for __key_link() so that the various callers in request_key.c can deal with any errors from this source before attempting to construct a key. This allows them to assume that the actual linkage step is guaranteed to be successful. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/keys/internal.h')
-rw-r--r--security/keys/internal.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/security/keys/internal.h b/security/keys/internal.h
index 24ba0307b7ad..5d4402a1161a 100644
--- a/security/keys/internal.h
+++ b/security/keys/internal.h
@@ -87,7 +87,16 @@ extern wait_queue_head_t request_key_conswq;
87extern struct key_type *key_type_lookup(const char *type); 87extern struct key_type *key_type_lookup(const char *type);
88extern void key_type_put(struct key_type *ktype); 88extern void key_type_put(struct key_type *ktype);
89 89
90extern int __key_link(struct key *keyring, struct key *key); 90extern int __key_link_begin(struct key *keyring,
91 const struct key_type *type,
92 const char *description,
93 struct keyring_list **_prealloc);
94extern int __key_link_check_live_key(struct key *keyring, struct key *key);
95extern void __key_link(struct key *keyring, struct key *key,
96 struct keyring_list **_prealloc);
97extern void __key_link_end(struct key *keyring,
98 struct key_type *type,
99 struct keyring_list *prealloc);
91 100
92extern key_ref_t __keyring_search_one(key_ref_t keyring_ref, 101extern key_ref_t __keyring_search_one(key_ref_t keyring_ref,
93 const struct key_type *type, 102 const struct key_type *type,