summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorBen Dooks <ben.dooks@codethink.co.uk>2019-03-01 11:30:26 +0000
committerJames Morris <james.morris@microsoft.com>2019-03-04 15:48:37 -0800
commit468e91cecb3218afd684b8c422490dfebe0691bb (patch)
tree17a1a327d558226259891e303dd3b8c518501818 /security
parentb102c11e1a10e1328c9610665e45dd07bf4a3696 (diff)
downloadlinux-468e91cecb3218afd684b8c422490dfebe0691bb.tar.bz2
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>
Diffstat (limited to 'security')
-rw-r--r--security/keys/keyctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c
index e8093d025966..5efde255650b 100644
--- a/security/keys/keyctl.c
+++ b/security/keys/keyctl.c
@@ -1751,7 +1751,7 @@ SYSCALL_DEFINE5(keyctl, int, option, unsigned long, arg2, unsigned long, arg3,
return -EINVAL;
return keyctl_pkey_query((key_serial_t)arg2,
(const char __user *)arg4,
- (struct keyctl_pkey_query *)arg5);
+ (struct keyctl_pkey_query __user *)arg5);
case KEYCTL_PKEY_ENCRYPT:
case KEYCTL_PKEY_DECRYPT: