mirror of https://github.com/OpenIPC/firmware.git
31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
diff -drupN a/security/keys/user_defined.c b/security/keys/user_defined.c
|
|
--- a/security/keys/user_defined.c 2018-08-06 17:23:04.000000000 +0300
|
|
+++ b/security/keys/user_defined.c 2022-06-12 05:28:14.000000000 +0300
|
|
@@ -107,7 +107,7 @@ int user_update(struct key *key, struct
|
|
/* attach the new data, displacing the old */
|
|
key->expiry = prep->expiry;
|
|
if (key_is_positive(key))
|
|
- zap = rcu_dereference_key(key);
|
|
+ zap = dereference_key_locked(key);
|
|
rcu_assign_keypointer(key, prep->payload.data[0]);
|
|
prep->payload.data[0] = NULL;
|
|
|
|
@@ -123,7 +123,7 @@ EXPORT_SYMBOL_GPL(user_update);
|
|
*/
|
|
void user_revoke(struct key *key)
|
|
{
|
|
- struct user_key_payload *upayload = key->payload.data[0];
|
|
+ struct user_key_payload *upayload = user_key_payload_locked(key);
|
|
|
|
/* clear the quota */
|
|
key_payload_reserve(key, 0);
|
|
@@ -169,7 +169,7 @@ long user_read(const struct key *key, ch
|
|
const struct user_key_payload *upayload;
|
|
long ret;
|
|
|
|
- upayload = user_key_payload(key);
|
|
+ upayload = user_key_payload_locked(key);
|
|
ret = upayload->datalen;
|
|
|
|
/* we can return the data as is */
|