aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/compat.c')
-rw-r--r--ipc/compat.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/ipc/compat.c b/ipc/compat.c
index 98b9016cab6c..a4695ada3275 100644
--- a/ipc/compat.c
+++ b/ipc/compat.c
@@ -753,14 +753,8 @@ COMPAT_SYSCALL_DEFINE4(semtimedop, int, semid, struct sembuf __user *, tsems,
753 unsigned, nsops, 753 unsigned, nsops,
754 const struct compat_timespec __user *, timeout) 754 const struct compat_timespec __user *, timeout)
755{ 755{
756 struct timespec __user *ts64 = NULL; 756 struct timespec __user *ts64;
757 if (timeout) { 757 if (compat_convert_timespec(&ts64, timeout))
758 struct timespec ts; 758 return -EFAULT;
759 ts64 = compat_alloc_user_space(sizeof(*ts64));
760 if (get_compat_timespec(&ts, timeout))
761 return -EFAULT;
762 if (copy_to_user(ts64, &ts, sizeof(ts)))
763 return -EFAULT;
764 }
765 return sys_semtimedop(semid, tsems, nsops, ts64); 759 return sys_semtimedop(semid, tsems, nsops, ts64);
766} 760}