diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-10-27 12:39:22 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-10-27 12:39:22 +0200 |
commit | 12bae23507129a7337378e6433bff6f8696bdb45 (patch) | |
tree | ad28d5bcebf3aebe8926446a5d12418f62276b8a /arch/s390/kernel/compat_linux.c | |
parent | c2b1449bd1fd73103ed5ff1a28d8f7cbc8a01b52 (diff) | |
download | op-kernel-dev-12bae23507129a7337378e6433bff6f8696bdb45.zip op-kernel-dev-12bae23507129a7337378e6433bff6f8696bdb45.tar.gz |
[S390] uaccess error handling.
Consider return values for all user space access function and
return -EFAULT on error.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/compat_linux.c')
-rw-r--r-- | arch/s390/kernel/compat_linux.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index 2001767..5b33f82 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c @@ -757,7 +757,9 @@ asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args) put_user(oldlen, (u32 __user *)compat_ptr(tmp.oldlenp))) error = -EFAULT; } - copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused)); + if (copy_to_user(args->__unused, tmp.__unused, + sizeof(tmp.__unused))) + error = -EFAULT; } return error; } |