summaryrefslogtreecommitdiffstats
path: root/kernel/security/keys
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/security/keys')
-rw-r--r--kernel/security/keys/key.c2
-rw-r--r--kernel/security/keys/proc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/kernel/security/keys/key.c b/kernel/security/keys/key.c
index ab7997ded..534808915 100644
--- a/kernel/security/keys/key.c
+++ b/kernel/security/keys/key.c
@@ -578,7 +578,7 @@ int key_reject_and_link(struct key *key,
mutex_unlock(&key_construction_mutex);
- if (keyring)
+ if (keyring && link_ret == 0)
__key_link_end(keyring, &key->index_key, edit);
/* wake up anyone waiting for a key to be constructed */
diff --git a/kernel/security/keys/proc.c b/kernel/security/keys/proc.c
index f0611a636..b9f531c9e 100644
--- a/kernel/security/keys/proc.c
+++ b/kernel/security/keys/proc.c
@@ -181,7 +181,7 @@ static int proc_keys_show(struct seq_file *m, void *v)
struct timespec now;
unsigned long timo;
key_ref_t key_ref, skey_ref;
- char xbuf[12];
+ char xbuf[16];
int rc;
struct keyring_search_context ctx = {