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 ef03a82a0135..d37f713e73ce 100644
--- a/security/keys/keyring.c
+++ b/security/keys/keyring.c
@@ -669,7 +669,7 @@ static void keyring_unlink_rcu_disposal(struct rcu_head *rcu)
669 struct keyring_list *klist = 669 struct keyring_list *klist =
670 container_of(rcu, struct keyring_list, rcu); 670 container_of(rcu, struct keyring_list, rcu);
671 671
672 if (klist->delkey != USHORT_MAX) 672 if (klist->delkey != USHRT_MAX)
673 key_put(klist->keys[klist->delkey]); 673 key_put(klist->keys[klist->delkey]);
674 kfree(klist); 674 kfree(klist);
675} 675}
@@ -746,7 +746,7 @@ int __key_link_begin(struct key *keyring, const struct key_type *type,
746 max += klist->maxkeys; 746 max += klist->maxkeys;
747 747
748 ret = -ENFILE; 748 ret = -ENFILE;
749 if (max > USHORT_MAX - 1) 749 if (max > USHRT_MAX - 1)
750 goto error_quota; 750 goto error_quota;
751 size = sizeof(*klist) + sizeof(struct key *) * max; 751 size = sizeof(*klist) + sizeof(struct key *) * max;
752 if (size > PAGE_SIZE) 752 if (size > PAGE_SIZE)
@@ -763,7 +763,7 @@ int __key_link_begin(struct key *keyring, const struct key_type *type,
763 sizeof(struct key *) * klist->nkeys); 763 sizeof(struct key *) * klist->nkeys);
764 nklist->delkey = klist->nkeys; 764 nklist->delkey = klist->nkeys;
765 nklist->nkeys = klist->nkeys + 1; 765 nklist->nkeys = klist->nkeys + 1;
766 klist->delkey = USHORT_MAX; 766 klist->delkey = USHRT_MAX;
767 } else { 767 } else {
768 nklist->nkeys = 1; 768 nklist->nkeys = 1;
769 nklist->delkey = 0; 769 nklist->delkey = 0;