aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--security/keys/keyctl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c
index b85ace218395..1160b644dace 100644
--- a/security/keys/keyctl.c
+++ b/security/keys/keyctl.c
@@ -343,7 +343,13 @@ long keyctl_revoke_key(key_serial_t id)
343 key_ref = lookup_user_key(id, 0, KEY_WRITE); 343 key_ref = lookup_user_key(id, 0, KEY_WRITE);
344 if (IS_ERR(key_ref)) { 344 if (IS_ERR(key_ref)) {
345 ret = PTR_ERR(key_ref); 345 ret = PTR_ERR(key_ref);
346 goto error; 346 if (ret != -EACCES)
347 goto error;
348 key_ref = lookup_user_key(id, 0, KEY_SETATTR);
349 if (IS_ERR(key_ref)) {
350 ret = PTR_ERR(key_ref);
351 goto error;
352 }
347 } 353 }
348 354
349 key_revoke(key_ref_to_ptr(key_ref)); 355 key_revoke(key_ref_to_ptr(key_ref));