diff options
author | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2012-01-17 15:39:51 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2012-01-17 18:41:29 -0500 |
commit | ee0b31a25a010116f44fca6c96f4516d417793dd (patch) | |
tree | d7670d202d0f4888b5213ed73d88c9a80bd05b74 /include/linux/key.h | |
parent | efde8b6e16f11e7d1681c68d86c7fd51053cada7 (diff) |
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 'include/linux/key.h')
-rw-r--r-- | include/linux/key.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/key.h b/include/linux/key.h index 183a6af7715d..bfc014c57351 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -293,6 +293,9 @@ static inline bool key_is_instantiated(const struct key *key) | |||
293 | (rcu_dereference_protected((KEY)->payload.rcudata, \ | 293 | (rcu_dereference_protected((KEY)->payload.rcudata, \ |
294 | rwsem_is_locked(&((struct key *)(KEY))->sem))) | 294 | rwsem_is_locked(&((struct key *)(KEY))->sem))) |
295 | 295 | ||
296 | #define rcu_assign_keypointer(KEY, PAYLOAD) \ | ||
297 | (rcu_assign_pointer((KEY)->payload.rcudata, PAYLOAD)) | ||
298 | |||
296 | #ifdef CONFIG_SYSCTL | 299 | #ifdef CONFIG_SYSCTL |
297 | extern ctl_table key_sysctls[]; | 300 | extern ctl_table key_sysctls[]; |
298 | #endif | 301 | #endif |