diff options
| author | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2012-01-18 05:03:14 -0500 |
|---|---|---|
| committer | James Morris <jmorris@namei.org> | 2012-01-19 00:16:29 -0500 |
| commit | f6b24579d099ebb67f39cd7924a72a7eec0ce6ae (patch) | |
| tree | a97004bb108138294b77e98466a4b9e76a9a198c | |
| parent | 3db59dd93309710c40aaf1571c607cb0feef3ecb (diff) | |
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>
| -rw-r--r-- | security/keys/user_defined.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/security/keys/user_defined.c b/security/keys/user_defined.c index 69ff52c08e97..2aee3c5a3b99 100644 --- a/security/keys/user_defined.c +++ b/security/keys/user_defined.c | |||
| @@ -59,7 +59,7 @@ int user_instantiate(struct key *key, const void *data, size_t datalen) | |||
| 59 | /* attach the data */ | 59 | /* attach the data */ |
| 60 | upayload->datalen = datalen; | 60 | upayload->datalen = datalen; |
| 61 | memcpy(upayload->data, data, datalen); | 61 | memcpy(upayload->data, data, datalen); |
| 62 | rcu_assign_pointer(key->payload.data, upayload); | 62 | rcu_assign_keypointer(key, upayload); |
| 63 | ret = 0; | 63 | ret = 0; |
| 64 | 64 | ||
| 65 | error: | 65 | error: |
| @@ -98,7 +98,7 @@ int user_update(struct key *key, const void *data, size_t datalen) | |||
| 98 | if (ret == 0) { | 98 | if (ret == 0) { |
| 99 | /* attach the new data, displacing the old */ | 99 | /* attach the new data, displacing the old */ |
| 100 | zap = key->payload.data; | 100 | zap = key->payload.data; |
| 101 | rcu_assign_pointer(key->payload.data, upayload); | 101 | rcu_assign_keypointer(key, upayload); |
| 102 | key->expiry = 0; | 102 | key->expiry = 0; |
| 103 | } | 103 | } |
| 104 | 104 | ||
| @@ -133,7 +133,7 @@ void user_revoke(struct key *key) | |||
| 133 | key_payload_reserve(key, 0); | 133 | key_payload_reserve(key, 0); |
| 134 | 134 | ||
| 135 | if (upayload) { | 135 | if (upayload) { |
| 136 | rcu_assign_pointer(key->payload.data, NULL); | 136 | rcu_assign_keypointer(key, NULL); |
| 137 | kfree_rcu(upayload, rcu); | 137 | kfree_rcu(upayload, rcu); |
| 138 | } | 138 | } |
| 139 | } | 139 | } |
