aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/compat_linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/compat_linux.c')
-rw-r--r--arch/s390/kernel/compat_linux.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index 5b33f823863a..cf84d697daed 100644
--- a/arch/s390/kernel/compat_linux.c
+++ b/arch/s390/kernel/compat_linux.c
@@ -416,7 +416,7 @@ asmlinkage long sys32_sysinfo(struct sysinfo32 __user *info)
416 mm_segment_t old_fs = get_fs (); 416 mm_segment_t old_fs = get_fs ();
417 417
418 set_fs (KERNEL_DS); 418 set_fs (KERNEL_DS);
419 ret = sys_sysinfo((struct sysinfo __user *) &s); 419 ret = sys_sysinfo((struct sysinfo __force __user *) &s);
420 set_fs (old_fs); 420 set_fs (old_fs);
421 err = put_user (s.uptime, &info->uptime); 421 err = put_user (s.uptime, &info->uptime);
422 err |= __put_user (s.loads[0], &info->loads[0]); 422 err |= __put_user (s.loads[0], &info->loads[0]);
@@ -445,7 +445,8 @@ asmlinkage long sys32_sched_rr_get_interval(compat_pid_t pid,
445 mm_segment_t old_fs = get_fs (); 445 mm_segment_t old_fs = get_fs ();
446 446
447 set_fs (KERNEL_DS); 447 set_fs (KERNEL_DS);
448 ret = sys_sched_rr_get_interval(pid, (struct timespec __user *) &t); 448 ret = sys_sched_rr_get_interval(pid,
449 (struct timespec __force __user *) &t);
449 set_fs (old_fs); 450 set_fs (old_fs);
450 if (put_compat_timespec(&t, interval)) 451 if (put_compat_timespec(&t, interval))
451 return -EFAULT; 452 return -EFAULT;
@@ -472,8 +473,8 @@ asmlinkage long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set,
472 } 473 }
473 set_fs (KERNEL_DS); 474 set_fs (KERNEL_DS);
474 ret = sys_rt_sigprocmask(how, 475 ret = sys_rt_sigprocmask(how,
475 set ? (sigset_t __user *) &s : NULL, 476 set ? (sigset_t __force __user *) &s : NULL,
476 oset ? (sigset_t __user *) &s : NULL, 477 oset ? (sigset_t __force __user *) &s : NULL,
477 sigsetsize); 478 sigsetsize);
478 set_fs (old_fs); 479 set_fs (old_fs);
479 if (ret) return ret; 480 if (ret) return ret;
@@ -499,7 +500,7 @@ asmlinkage long sys32_rt_sigpending(compat_sigset_t __user *set,
499 mm_segment_t old_fs = get_fs(); 500 mm_segment_t old_fs = get_fs();
500 501
501 set_fs (KERNEL_DS); 502 set_fs (KERNEL_DS);
502 ret = sys_rt_sigpending((sigset_t __user *) &s, sigsetsize); 503 ret = sys_rt_sigpending((sigset_t __force __user *) &s, sigsetsize);
503 set_fs (old_fs); 504 set_fs (old_fs);
504 if (!ret) { 505 if (!ret) {
505 switch (_NSIG_WORDS) { 506 switch (_NSIG_WORDS) {
@@ -524,7 +525,7 @@ sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo)
524 if (copy_siginfo_from_user32(&info, uinfo)) 525 if (copy_siginfo_from_user32(&info, uinfo))
525 return -EFAULT; 526 return -EFAULT;
526 set_fs (KERNEL_DS); 527 set_fs (KERNEL_DS);
527 ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __user *) &info); 528 ret = sys_rt_sigqueueinfo(pid, sig, (siginfo_t __force __user *) &info);
528 set_fs (old_fs); 529 set_fs (old_fs);
529 return ret; 530 return ret;
530} 531}
@@ -682,7 +683,7 @@ asmlinkage long sys32_sendfile(int out_fd, int in_fd, compat_off_t __user *offse
682 683
683 set_fs(KERNEL_DS); 684 set_fs(KERNEL_DS);
684 ret = sys_sendfile(out_fd, in_fd, 685 ret = sys_sendfile(out_fd, in_fd,
685 offset ? (off_t __user *) &of : NULL, count); 686 offset ? (off_t __force __user *) &of : NULL, count);
686 set_fs(old_fs); 687 set_fs(old_fs);
687 688
688 if (offset && put_user(of, offset)) 689 if (offset && put_user(of, offset))
@@ -703,7 +704,8 @@ asmlinkage long sys32_sendfile64(int out_fd, int in_fd,
703 704
704 set_fs(KERNEL_DS); 705 set_fs(KERNEL_DS);
705 ret = sys_sendfile64(out_fd, in_fd, 706 ret = sys_sendfile64(out_fd, in_fd,
706 offset ? (loff_t __user *) &lof : NULL, count); 707 offset ? (loff_t __force __user *) &lof : NULL,
708 count);
707 set_fs(old_fs); 709 set_fs(old_fs);
708 710
709 if (offset && put_user(lof, offset)) 711 if (offset && put_user(lof, offset))