summaryrefslogtreecommitdiff
path: root/security/keys/internal.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2019-05-30 13:37:39 +0300
committerDavid Howells <dhowells@redhat.com>2019-05-31 00:30:55 +0300
commitdf593ee23e05cdda16c8c995e5818779431bb29f (patch)
tree1abe20cf6ac343d4b0f92756c19ad1b6b7a70a65 /security/keys/internal.h
parenteb0f68cb7042fd5cff0d6b57966a93049fb2495b (diff)
downloadlinux-df593ee23e05cdda16c8c995e5818779431bb29f.tar.xz
keys: Hoist locking out of __key_link_begin()
Hoist the locking of out of __key_link_begin() and into its callers. This is necessary to allow the upcoming key_move() operation to correctly order taking of the source keyring semaphore, the destination keyring semaphore and the keyring serialisation lock. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'security/keys/internal.h')
-rw-r--r--security/keys/internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/keys/internal.h b/security/keys/internal.h
index 8f533c81aa8d..25cdd0cbdc06 100644
--- a/security/keys/internal.h
+++ b/security/keys/internal.h
@@ -93,6 +93,8 @@ extern wait_queue_head_t request_key_conswq;
extern struct key_type *key_type_lookup(const char *type);
extern void key_type_put(struct key_type *ktype);
+extern int __key_link_lock(struct key *keyring,
+ const struct keyring_index_key *index_key);
extern int __key_link_begin(struct key *keyring,
const struct keyring_index_key *index_key,
struct assoc_array_edit **_edit);