keys: fix user_defined key sparse messages

Replace the rcu_assign_pointer() calls with rcu_assign_keypointer().

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:
Mimi Zohar 2012-01-18 10:03:14 +00:00 коммит произвёл James Morris
Родитель 3db59dd933
Коммит f6b24579d0
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -59,7 +59,7 @@ int user_instantiate(struct key *key, const void *data, size_t datalen)
/* attach the data */
upayload->datalen = datalen;
memcpy(upayload->data, data, datalen);
rcu_assign_pointer(key->payload.data, upayload);
rcu_assign_keypointer(key, upayload);
ret = 0;
error:
@ -98,7 +98,7 @@ int user_update(struct key *key, const void *data, size_t datalen)
if (ret == 0) {
/* attach the new data, displacing the old */
zap = key->payload.data;
rcu_assign_pointer(key->payload.data, upayload);
rcu_assign_keypointer(key, upayload);
key->expiry = 0;
}
@ -133,7 +133,7 @@ void user_revoke(struct key *key)
key_payload_reserve(key, 0);
if (upayload) {
rcu_assign_pointer(key->payload.data, NULL);
rcu_assign_keypointer(key, NULL);
kfree_rcu(upayload, rcu);
}
}