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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/security/keys/key.c b/security/keys/key.c
index 3762d5b1ce64..bd9d2670e9c4 100644
--- a/security/keys/key.c
+++ b/security/keys/key.c
@@ -956,8 +956,10 @@ void unregister_key_type(struct key_type *ktype)
956 for (_n = rb_first(&key_serial_tree); _n; _n = rb_next(_n)) { 956 for (_n = rb_first(&key_serial_tree); _n; _n = rb_next(_n)) {
957 key = rb_entry(_n, struct key, serial_node); 957 key = rb_entry(_n, struct key, serial_node);
958 958
959 if (key->type == ktype) 959 if (key->type == ktype) {
960 key->type = &key_type_dead; 960 key->type = &key_type_dead;
961 set_bit(KEY_FLAG_DEAD, &key->flags);
962 }
961 } 963 }
962 964
963 spin_unlock(&key_serial_lock); 965 spin_unlock(&key_serial_lock);