diff options
author | David Howells <dhowells@redhat.com> | 2014-07-18 13:56:34 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2014-07-22 16:46:02 -0400 |
commit | fc7c70e0b6b637bbf6cf8b9cee547d5ae83899c9 (patch) | |
tree | d671aaf8c103de0a55cdac7826fe1e18bd569040 /security | |
parent | 6a09d17bb66a533c165be81e8a4c3557f68e1a3b (diff) |
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')
-rw-r--r-- | security/keys/encrypted-keys/encrypted.c | 2 | ||||
-rw-r--r-- | security/keys/key.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/security/keys/encrypted-keys/encrypted.c b/security/keys/encrypted-keys/encrypted.c index 5fe443d120af..d252c5704f8a 100644 --- a/security/keys/encrypted-keys/encrypted.c +++ b/security/keys/encrypted-keys/encrypted.c | |||
@@ -811,7 +811,7 @@ static int encrypted_instantiate(struct key *key, | |||
811 | goto out; | 811 | goto out; |
812 | } | 812 | } |
813 | 813 | ||
814 | rcu_assign_keypointer(key, epayload); | 814 | prep->payload[0] = epayload; |
815 | out: | 815 | out: |
816 | kfree(datablob); | 816 | kfree(datablob); |
817 | return ret; | 817 | return ret; |
diff --git a/security/keys/key.c b/security/keys/key.c index 7c9acbf106b6..03620a35a4dc 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) | |||
1043 | if (ret == 0) { | 1043 | if (ret == 0) { |
1044 | key->type_data.p[0] = prep->type_data[0]; | 1044 | key->type_data.p[0] = prep->type_data[0]; |
1045 | key->type_data.p[1] = prep->type_data[1]; | 1045 | key->type_data.p[1] = prep->type_data[1]; |
1046 | rcu_assign_keypointer(key, prep->payload); | 1046 | rcu_assign_keypointer(key, prep->payload[0]); |
1047 | key->payload.data2[1] = prep->payload[1]; | ||
1047 | prep->type_data[0] = NULL; | 1048 | prep->type_data[0] = NULL; |
1048 | prep->type_data[1] = NULL; | 1049 | prep->type_data[1] = NULL; |
1049 | prep->payload = NULL; | 1050 | prep->payload[0] = NULL; |
1051 | prep->payload[1] = NULL; | ||
1050 | } | 1052 | } |
1051 | pr_devel("<==%s() = %d\n", __func__, ret); | 1053 | pr_devel("<==%s() = %d\n", __func__, ret); |
1052 | return ret; | 1054 | return ret; |