Commit 6d528b08 authored by David Howells's avatar David Howells Committed by James Morris

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: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent 3ecf1b4f
...@@ -860,8 +860,7 @@ void __key_link(struct key *keyring, struct key *key, ...@@ -860,8 +860,7 @@ void __key_link(struct key *keyring, struct key *key,
kenter("%d,%d,%p", keyring->serial, key->serial, nklist); kenter("%d,%d,%p", keyring->serial, key->serial, nklist);
klist = rcu_dereference_protected(keyring->payload.subscriptions, klist = rcu_dereference_locked_keyring(keyring);
rwsem_is_locked(&keyring->sem));
atomic_inc(&key->usage); atomic_inc(&key->usage);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment