linux-next: manual merge of the compat tree with the tree
Mark Brown
maintainerQuoted 8 lines · Mark Brown
Today's linux-next merge of the compat tree got a conflict in between commit
81993e81a99("compat: Get rid of (get|put)_compat_time(val|spec)") from the tip tree and commit932602e23832("fs/compat: convert toCOMPAT_SYSCALL_DEFINEwith changing parameter types") from the compat tree.I fixed it up (see below) and can carry the fix as necessary (no action is required).
And essentially the same thing in ipc/compat_mq.c:
ipc/compat_mq.c +0 -0
@@@ -64,10 -64,24 +64,10 @@@ COMPAT_SYSCALL_DEFINE4(mq_open, const creturn sys_mq_open (u_name, oflag, mode, p); } -asmlinkage long compat_sys_mq_timedsend (mqd_t mqdes, -const char __user *u_msg_ptr, -size_t msg_len,unsigned int msg_prio, - const struct compat_timespec __user *u_abs_timeout) -static int compat_prepare_timeout(struct timespec __user **p, - const struct compat_timespec __user *u) -{ - struct timespec ts; - if (!u) { - *p =NULL ; - return 0; - } - *p =compat_alloc_user_space (sizeof (ts)); - if (get_compat_timespec(&ts, u) || copy_to_user(*p, &ts, sizeof(ts))) - return -EFAULT ; - return 0; -} - +COMPAT_SYSCALL_DEFINE5 (mq_timedsend, mqd_t, mqdes, + const char __user *, u_msg_ptr, + compat_size_t, msg_len, unsigned int, msg_prio, + const struct compat_timespec __user *, u_abs_timeout) {struct timespec __user *u_ts; msg_prio, u_ts); } - asmlinkage ssize_t compat_sys_mq_timedreceive(mqd_t mqdes, -char __user *u_msg_ptr, -size_t msg_len,unsigned int __user *u_msg_prio, -const struct compat_timespec __user *u_abs_timeout) +COMPAT_SYSCALL_DEFINE5 (mq_timedreceive, mqd_t, mqdes, + char __user *, u_msg_ptr, + compat_size_t, msg_len, unsigned int __user *, u_msg_prio, + const struct compat_timespec __user *, u_abs_timeout) {struct timespec __user *u_ts; - if (compat_prepare_timeout(&u_ts, u_abs_timeout)) + + if (compat_convert_timespec(&u_ts, u_abs_timeout)) return -EFAULT; return sys_mq_timedreceive(mqdes, u_msg_ptr, msg_len,