diff options
author | David Howells <dhowells@redhat.com> | 2019-06-19 16:10:15 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2019-06-19 16:10:15 +0100 |
commit | 896f1950e5944532b971d880a6bae7fba3b6a8d3 (patch) | |
tree | 8bf2eddc61af7f782bdd579e87fa0f7760ea5ced /Documentation/security/keys/core.rst | |
parent | e59428f721ee096d8a020504ea908a6f0d952735 (diff) | |
download | linux-896f1950e5944532b971d880a6bae7fba3b6a8d3.tar.gz linux-896f1950e5944532b971d880a6bae7fba3b6a8d3.tar.bz2 linux-896f1950e5944532b971d880a6bae7fba3b6a8d3.zip |
keys: Provide request_key_rcu()
Provide a request_key_rcu() function that can be used to request a key
under RCU conditions. It can only search and check permissions; it cannot
allocate a new key, upcall or wait for an upcall to complete. It may
return a partially constructed key.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'Documentation/security/keys/core.rst')
-rw-r--r-- | Documentation/security/keys/core.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/security/keys/core.rst b/Documentation/security/keys/core.rst index 82dd457ff78d..003f1452a5b7 100644 --- a/Documentation/security/keys/core.rst +++ b/Documentation/security/keys/core.rst @@ -1147,6 +1147,16 @@ payload contents" for more information. case error ERESTARTSYS will be returned. + * To search for a key under RCU conditions, call:: + + struct key *request_key_rcu(const struct key_type *type, + const char *description); + + which is similar to request_key() except that it does not check for keys + that are under construction and it will not call out to userspace to + construct a key if it can't find a match. + + * When it is no longer required, the key should be released using:: void key_put(struct key *key); |