diff options
author | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2012-01-17 21:39:51 +0100 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2012-01-18 00:41:29 +0100 |
commit | ee0b31a25a010116f44fca6c96f4516d417793dd (patch) | |
tree | d7670d202d0f4888b5213ed73d88c9a80bd05b74 /security/keys/trusted.c | |
parent | KEYS: Add missing smp_rmb() primitives to the keyring search code (diff) | |
download | linux-ee0b31a25a010116f44fca6c96f4516d417793dd.tar.xz linux-ee0b31a25a010116f44fca6c96f4516d417793dd.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | security/keys/trusted.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/keys/trusted.c b/security/keys/trusted.c index 0ed5fdf238a2..2d5d041f2049 100644 --- a/security/keys/trusted.c +++ b/security/keys/trusted.c @@ -993,7 +993,7 @@ out: kfree(datablob); kfree(options); if (!ret) - rcu_assign_pointer(key->payload.data, payload); + rcu_assign_keypointer(key, payload); else kfree(payload); return ret; @@ -1067,7 +1067,7 @@ static int trusted_update(struct key *key, const void *data, size_t datalen) goto out; } } - rcu_assign_pointer(key->payload.data, new_p); + rcu_assign_keypointer(key, new_p); call_rcu(&p->rcu, trusted_rcu_free); out: kfree(datablob); |