aboutsummaryrefslogtreecommitdiffstats
path: root/security/keys/keyring.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/keys/keyring.c')
-rw-r--r--security/keys/keyring.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/security/keys/keyring.c b/security/keys/keyring.c
index b42f2d4f7f83..87eff32b53f4 100644
--- a/security/keys/keyring.c
+++ b/security/keys/keyring.c
@@ -479,7 +479,7 @@ not_this_keyring:
479 479
480 /* we found a viable match */ 480 /* we found a viable match */
481found: 481found:
482 atomic_inc(&key->usage); 482 __key_get(key);
483 key->last_used_at = ctx->now.tv_sec; 483 key->last_used_at = ctx->now.tv_sec;
484 keyring->last_used_at = ctx->now.tv_sec; 484 keyring->last_used_at = ctx->now.tv_sec;
485 while (sp > 0) 485 while (sp > 0)
@@ -573,7 +573,7 @@ key_ref_t __keyring_search_one(key_ref_t keyring_ref,
573 return ERR_PTR(-ENOKEY); 573 return ERR_PTR(-ENOKEY);
574 574
575found: 575found:
576 atomic_inc(&key->usage); 576 __key_get(key);
577 keyring->last_used_at = key->last_used_at = 577 keyring->last_used_at = key->last_used_at =
578 current_kernel_time().tv_sec; 578 current_kernel_time().tv_sec;
579 rcu_read_unlock(); 579 rcu_read_unlock();
@@ -909,7 +909,7 @@ void __key_link(struct key *keyring, struct key *key,
909 909
910 klist = rcu_dereference_locked_keyring(keyring); 910 klist = rcu_dereference_locked_keyring(keyring);
911 911
912 atomic_inc(&key->usage); 912 __key_get(key);
913 keyring->last_used_at = key->last_used_at = 913 keyring->last_used_at = key->last_used_at =
914 current_kernel_time().tv_sec; 914 current_kernel_time().tv_sec;
915 915