summaryrefslogtreecommitdiffstats
path: root/security/keys/compat.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-09-25 06:51:41 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2020-10-03 06:02:13 +0200
commit89cd35c58bc2e36bfdc23dde67a429b08cf4ae03 (patch)
tree540a413bab63b20e24dba2dece0044277bb778a1 /security/keys/compat.c
parentiov_iter: refactor rw_copy_check_uvector and import_iovec (diff)
downloadlinux-89cd35c58bc2e36bfdc23dde67a429b08cf4ae03.tar.xz
linux-89cd35c58bc2e36bfdc23dde67a429b08cf4ae03.zip
iov_iter: transparently handle compat iovecs in import_iovec
Use in compat_syscall to import either native or the compat iovecs, and remove the now superflous compat_import_iovec. This removes the need for special compat logic in most callers, and the remaining ones can still be simplified by using __import_iovec with a bool compat parameter. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'security/keys/compat.c')
-rw-r--r--security/keys/compat.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/security/keys/compat.c b/security/keys/compat.c
index 6ee9d8f6a4a5..7ae531db031c 100644
--- a/security/keys/compat.c
+++ b/security/keys/compat.c
@@ -33,9 +33,8 @@ static long compat_keyctl_instantiate_key_iov(
if (!_payload_iov)
ioc = 0;
- ret = compat_import_iovec(WRITE, _payload_iov, ioc,
- ARRAY_SIZE(iovstack), &iov,
- &from);
+ ret = import_iovec(WRITE, (const struct iovec __user *)_payload_iov,
+ ioc, ARRAY_SIZE(iovstack), &iov, &from);
if (ret < 0)
return ret;