Message ID | d73a29f9ab66daa9e4f3bbb385baab5cc6df34bb.camel@HansenPartnership.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | KEYS: trusted: return -EEXIST when refusing to update existing key | expand |
diff --git a/security/keys/trusted-keys/trusted_core.c b/security/keys/trusted-keys/trusted_core.c index c6fc50d67214..8dcd84137035 100644 --- a/security/keys/trusted-keys/trusted_core.c +++ b/security/keys/trusted-keys/trusted_core.c @@ -254,7 +254,7 @@ static int trusted_update(struct key *key, struct key_preparsed_payload *prep) datablob[datalen] = '\0'; ret = datablob_parse(&datablob, new_p); if (ret != Opt_update) { - ret = -EINVAL; + ret = -EEXIST; kfree_sensitive(new_p); goto out; }