[PATCH v3] keys: remove __user annotation from function prototype

From: Randy Dunlap
Date: Tue Aug 30 2022 - 15:20:03 EST


Remove a missed __user annotation from the prototype for
keyring_read(). This cures a sparse warning when it complains about
the difference in the prototype and the function definition.

security/keys/keyring.c:481:13: sparse: long static [signed] [toplevel] keyring_read( ... )
security/keys/keyring.c:81:13: sparse: long static [addressable] [signed] [toplevel] keyring_read( ... )

Fixes: 796e46f9e2cb ("keys: Remove outdated __user annotations").
Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Cc: Jann Horn <jannh@xxxxxxxxxx>
Cc: David Howells <dhowells@xxxxxxxxxx>
Cc: Jarkko Sakkinen <jarkko@xxxxxxxxxx>
Cc: keyrings@xxxxxxxxxxxxxxx
Reviewed-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx>
---
v2: rebase/resend; no changes
v3: add Rev-by from Jarkko; resend

security/keys/keyring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/security/keys/keyring.c
+++ b/security/keys/keyring.c
@@ -79,7 +79,7 @@ static void keyring_revoke(struct key *k
static void keyring_destroy(struct key *keyring);
static void keyring_describe(const struct key *keyring, struct seq_file *m);
static long keyring_read(const struct key *keyring,
- char __user *buffer, size_t buflen);
+ char *buffer, size_t buflen);

struct key_type key_type_keyring = {
.name = "keyring",