aboutsummaryrefslogtreecommitdiffstats
path: root/security/keys/encrypted.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/keys/encrypted.c')
-rw-r--r--security/keys/encrypted.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/keys/encrypted.c b/security/keys/encrypted.c
index b1cba5bf0a5..e14c4beb821 100644
--- a/security/keys/encrypted.c
+++ b/security/keys/encrypted.c
@@ -708,6 +708,8 @@ static int encrypted_update(struct key *key, const void *data, size_t datalen)
char *new_master_desc = NULL;
int ret = 0;
+ if (test_bit(KEY_FLAG_NEGATIVE, &key->flags))
+ return -ENOKEY;
if (datalen <= 0 || datalen > 32767 || !data)
return -EINVAL;