diff options
Diffstat (limited to 'security/keys/user_defined.c')
-rw-r--r-- | security/keys/user_defined.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/keys/user_defined.c b/security/keys/user_defined.c index 3d8c68eba516..9f558bedba23 100644 --- a/security/keys/user_defined.c +++ b/security/keys/user_defined.c | |||
@@ -114,7 +114,7 @@ int user_update(struct key *key, struct key_preparsed_payload *prep) | |||
114 | 114 | ||
115 | /* attach the new data, displacing the old */ | 115 | /* attach the new data, displacing the old */ |
116 | key->expiry = prep->expiry; | 116 | key->expiry = prep->expiry; |
117 | if (!test_bit(KEY_FLAG_NEGATIVE, &key->flags)) | 117 | if (key_is_positive(key)) |
118 | zap = dereference_key_locked(key); | 118 | zap = dereference_key_locked(key); |
119 | rcu_assign_keypointer(key, prep->payload.data[0]); | 119 | rcu_assign_keypointer(key, prep->payload.data[0]); |
120 | prep->payload.data[0] = NULL; | 120 | prep->payload.data[0] = NULL; |
@@ -162,7 +162,7 @@ EXPORT_SYMBOL_GPL(user_destroy); | |||
162 | void user_describe(const struct key *key, struct seq_file *m) | 162 | void user_describe(const struct key *key, struct seq_file *m) |
163 | { | 163 | { |
164 | seq_puts(m, key->description); | 164 | seq_puts(m, key->description); |
165 | if (key_is_instantiated(key)) | 165 | if (key_is_positive(key)) |
166 | seq_printf(m, ": %u", key->datalen); | 166 | seq_printf(m, ": %u", key->datalen); |
167 | } | 167 | } |
168 | 168 | ||