summaryrefslogtreecommitdiffstats
path: root/security/keys/key.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2014-07-18 18:56:34 +0100
committerDavid Howells <dhowells@redhat.com>2014-07-22 21:46:02 +0100
commitfc7c70e0b6b637bbf6cf8b9cee547d5ae83899c9 (patch)
treed671aaf8c103de0a55cdac7826fe1e18bd569040 /security/keys/key.c
parent6a09d17bb66a533c165be81e8a4c3557f68e1a3b (diff)
downloadop-kernel-dev-fc7c70e0b6b637bbf6cf8b9cee547d5ae83899c9.zip
op-kernel-dev-fc7c70e0b6b637bbf6cf8b9cee547d5ae83899c9.tar.gz
KEYS: struct key_preparsed_payload should have two payload pointers
struct key_preparsed_payload should have two payload pointers to correspond with those in struct key. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Steve Dickson <steved@redhat.com> Acked-by: Jeff Layton <jlayton@primarydata.com> Reviewed-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'security/keys/key.c')
-rw-r--r--security/keys/key.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/security/keys/key.c b/security/keys/key.c
index 7c9acbf..03620a3 100644
--- a/security/keys/key.c
+++ b/security/keys/key.c
@@ -1043,10 +1043,12 @@ int generic_key_instantiate(struct key *key, struct key_preparsed_payload *prep)
if (ret == 0) {
key->type_data.p[0] = prep->type_data[0];
key->type_data.p[1] = prep->type_data[1];
- rcu_assign_keypointer(key, prep->payload);
+ rcu_assign_keypointer(key, prep->payload[0]);
+ key->payload.data2[1] = prep->payload[1];
prep->type_data[0] = NULL;
prep->type_data[1] = NULL;
- prep->payload = NULL;
+ prep->payload[0] = NULL;
+ prep->payload[1] = NULL;
}
pr_devel("<==%s() = %d\n", __func__, ret);
return ret;
OpenPOWER on IntegriCloud