Skip to content

Commit 468e91c

Browse files
bjdooks-ctJames Morris
authored andcommitted
keys: fix missing __user in KEYCTL_PKEY_QUERY
The arg5 of KEYCTL_PKEY_QUERY should have a __user pointer tag on it as it is a user pointer. This clears the following sparse warning for this: security/keys/keyctl.c:1755:43: warning: incorrect type in argument 3 (different address spaces) security/keys/keyctl.c:1755:43: expected struct keyctl_pkey_query [noderef] <asn:1>*<noident> security/keys/keyctl.c:1755:43: got struct keyctl_pkey_query *<noident> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Acked-by: Serge Hallyn <serge@hallyn.com> Signed-off-by: James Morris <james.morris@microsoft.com>
1 parent b102c11 commit 468e91c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎security/keys/keyctl.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1751,7 +1751,7 @@ SYSCALL_DEFINE5(keyctl, int, option, unsigned long, arg2, unsigned long, arg3,
17511751
return -EINVAL;
17521752
return keyctl_pkey_query((key_serial_t)arg2,
17531753
(const char __user *)arg4,
1754-
(struct keyctl_pkey_query *)arg5);
1754+
(struct keyctl_pkey_query __user *)arg5);
17551755

17561756
case KEYCTL_PKEY_ENCRYPT:
17571757
case KEYCTL_PKEY_DECRYPT:

0 commit comments

Comments
 (0)