mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 15:42:32 +00:00
keys: fix trusted/encrypted keys sparse rcu_assign_pointer messages
Define rcu_assign_keypointer(), which uses the key payload.rcudata instead of payload.data, to resolve the CONFIG_SPARSE_RCU_POINTER message: "incompatible types in comparison expression (different address spaces)" Replace the rcu_assign_pointer() calls in encrypted/trusted keys 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:
parent
efde8b6e16
commit
ee0b31a25a
4 changed files with 9 additions and 4 deletions
|
@ -810,7 +810,7 @@ static int encrypted_instantiate(struct key *key, const void *data,
|
|||
goto out;
|
||||
}
|
||||
|
||||
rcu_assign_pointer(key->payload.data, epayload);
|
||||
rcu_assign_keypointer(key, epayload);
|
||||
out:
|
||||
kfree(datablob);
|
||||
return ret;
|
||||
|
@ -874,7 +874,7 @@ static int encrypted_update(struct key *key, const void *data, size_t datalen)
|
|||
memcpy(new_epayload->payload_data, epayload->payload_data,
|
||||
epayload->payload_datalen);
|
||||
|
||||
rcu_assign_pointer(key->payload.data, new_epayload);
|
||||
rcu_assign_keypointer(key, new_epayload);
|
||||
call_rcu(&epayload->rcu, encrypted_rcu_free);
|
||||
out:
|
||||
kfree(buf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue