diff options
author | David Howells <dhowells@redhat.com> | 2011-08-22 09:08:51 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2011-08-22 19:57:34 -0400 |
commit | 6d528b082294f0ddabd6368297546a2c0b67d4fe (patch) | |
tree | 268bf5dbd454c689947c51867bf5b77e21c97eae /security | |
parent | 3ecf1b4f347210e39b156177e5b8a26ff8d00279 (diff) |
KEYS: __key_link() should use the RCU deref wrapper for keyring payloads
__key_link() should use the RCU deref wrapper rcu_dereference_locked_keyring()
for accessing keyring payloads rather than calling rcu_dereference_protected()
directly.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security')
-rw-r--r-- | security/keys/keyring.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/security/keys/keyring.c b/security/keys/keyring.c index 30e242f7bd0e..37a7f3b28852 100644 --- a/security/keys/keyring.c +++ b/security/keys/keyring.c | |||
@@ -860,8 +860,7 @@ void __key_link(struct key *keyring, struct key *key, | |||
860 | 860 | ||
861 | kenter("%d,%d,%p", keyring->serial, key->serial, nklist); | 861 | kenter("%d,%d,%p", keyring->serial, key->serial, nklist); |
862 | 862 | ||
863 | klist = rcu_dereference_protected(keyring->payload.subscriptions, | 863 | klist = rcu_dereference_locked_keyring(keyring); |
864 | rwsem_is_locked(&keyring->sem)); | ||
865 | 864 | ||
866 | atomic_inc(&key->usage); | 865 | atomic_inc(&key->usage); |
867 | 866 | ||