From: David Howells Date: Mon, 13 Jun 2011 21:33:52 +0000 (+0100) Subject: KEYS: Don't return EAGAIN to keyctl_assume_authority() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4d67431f80b1b822f0286afc9123ee453eac7334;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git KEYS: Don't return EAGAIN to keyctl_assume_authority() Don't return EAGAIN to keyctl_assume_authority() to indicate that a key could not be found (ENOKEY is only returned if a negative key is found). Instead return ENOKEY in both cases. Signed-off-by: David Howells Signed-off-by: James Morris --- diff --git a/security/keys/request_key_auth.c b/security/keys/request_key_auth.c index 6cff37529b80..60d4e3f5e4bb 100644 --- a/security/keys/request_key_auth.c +++ b/security/keys/request_key_auth.c @@ -251,6 +251,8 @@ struct key *key_get_instantiation_authkey(key_serial_t target_id) if (IS_ERR(authkey_ref)) { authkey = ERR_CAST(authkey_ref); + if (authkey == ERR_PTR(-EAGAIN)) + authkey = ERR_PTR(-ENOKEY); goto error; }