aboutsummaryrefslogtreecommitdiffstats
path: root/security/keys/key.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/keys/key.c')
-rw-r--r--security/keys/key.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/security/keys/key.c b/security/keys/key.c
index 4a1297d1ada4..3762d5b1ce64 100644
--- a/security/keys/key.c
+++ b/security/keys/key.c
@@ -642,10 +642,8 @@ struct key *key_lookup(key_serial_t id)
642 goto error; 642 goto error;
643 643
644 found: 644 found:
645 /* pretend it doesn't exist if it's dead */ 645 /* pretend it doesn't exist if it is awaiting deletion */
646 if (atomic_read(&key->usage) == 0 || 646 if (atomic_read(&key->usage) == 0)
647 test_bit(KEY_FLAG_DEAD, &key->flags) ||
648 key->type == &key_type_dead)
649 goto not_found; 647 goto not_found;
650 648
651 /* this races with key_put(), but that doesn't matter since key_put() 649 /* this races with key_put(), but that doesn't matter since key_put()