diff options
author | David Howells <dhowells@redhat.com> | 2013-09-24 10:35:16 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2013-09-24 10:35:16 +0100 |
commit | ccc3e6d9c9aea07a0b60b2b0bfc5b05a704b66d5 (patch) | |
tree | d111175934b1454fa275fe056f8c6d320e504b01 /Documentation | |
parent | d0a059cac6523b23ad7d743dec8783705aab1668 (diff) | |
download | linux-stable-ccc3e6d9c9aea07a0b60b2b0bfc5b05a704b66d5.tar.gz linux-stable-ccc3e6d9c9aea07a0b60b2b0bfc5b05a704b66d5.tar.bz2 linux-stable-ccc3e6d9c9aea07a0b60b2b0bfc5b05a704b66d5.zip |
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. the argument will not be parsed. -(*) Extra references can be made to a key by calling the following function: +(*) Extra references can be made to a key by calling one of the following + functions: + struct key *__key_get(struct key *key); struct key *key_get(struct key *key); - These need to be disposed of by calling key_put() when they've been - finished with. The key pointer passed in will be returned. If the pointer - is NULL or CONFIG_KEYS is not set then the key will not be dereferenced and - no increment will take place. + Keys so references will need to be disposed of by calling key_put() when + they've been finished with. The key pointer passed in will be returned. + + In the case of key_get(), if the pointer is NULL or CONFIG_KEYS is not set + then the key will not be dereferenced and no increment will take place. (*) A key's serial number can be obtained by calling: |