diff options
author | David Howells <dhowells@redhat.com> | 2013-09-24 05:35:16 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2013-09-24 05:35:16 -0400 |
commit | ccc3e6d9c9aea07a0b60b2b0bfc5b05a704b66d5 (patch) | |
tree | d111175934b1454fa275fe056f8c6d320e504b01 /Documentation | |
parent | d0a059cac6523b23ad7d743dec8783705aab1668 (diff) |
KEYS: Define a __key_get() wrapper to use rather than atomic_inc()
Define a __key_get() wrapper to use rather than atomic_inc() on the key usage
count as this makes it easier to hook in refcount error debugging.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/security/keys.txt | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Documentation/security/keys.txt b/Documentation/security/keys.txt index 9ede67084f0b..a4c33f1a7c6d 100644 --- a/Documentation/security/keys.txt +++ b/Documentation/security/keys.txt | |||
@@ -960,14 +960,17 @@ payload contents" for more information. | |||
960 | the argument will not be parsed. | 960 | the argument will not be parsed. |
961 | 961 | ||
962 | 962 | ||
963 | (*) Extra references can be made to a key by calling the following function: | 963 | (*) Extra references can be made to a key by calling one of the following |
964 | functions: | ||
964 | 965 | ||
966 | struct key *__key_get(struct key *key); | ||
965 | struct key *key_get(struct key *key); | 967 | struct key *key_get(struct key *key); |
966 | 968 | ||
967 | These need to be disposed of by calling key_put() when they've been | 969 | Keys so references will need to be disposed of by calling key_put() when |
968 | finished with. The key pointer passed in will be returned. If the pointer | 970 | they've been finished with. The key pointer passed in will be returned. |
969 | is NULL or CONFIG_KEYS is not set then the key will not be dereferenced and | 971 | |
970 | no increment will take place. | 972 | In the case of key_get(), if the pointer is NULL or CONFIG_KEYS is not set |
973 | then the key will not be dereferenced and no increment will take place. | ||
971 | 974 | ||
972 | 975 | ||
973 | (*) A key's serial number can be obtained by calling: | 976 | (*) A key's serial number can be obtained by calling: |