Commit 9aae8fc05d2d130797be436eb7cae29c32710193
1 parent
5cf2210022
Exists in
master
and in
20 other branches
switch rt_tgsigqueueinfo to COMPAT_SYSCALL_DEFINE
C ABI violations on sparc, ppc and mips Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing 3 changed files with 16 additions and 14 deletions Side-by-side Diff
include/linux/signal.h
... | ... | @@ -241,8 +241,6 @@ |
241 | 241 | struct task_struct *p, bool group); |
242 | 242 | extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p); |
243 | 243 | extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *); |
244 | -extern long do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, | |
245 | - siginfo_t *info); | |
246 | 244 | extern int do_sigtimedwait(const sigset_t *, siginfo_t *, |
247 | 245 | const struct timespec *); |
248 | 246 | extern int sigprocmask(int, sigset_t *, sigset_t *); |
kernel/compat.c
... | ... | @@ -1025,17 +1025,6 @@ |
1025 | 1025 | return ret; |
1026 | 1026 | } |
1027 | 1027 | |
1028 | -asmlinkage long | |
1029 | -compat_sys_rt_tgsigqueueinfo(compat_pid_t tgid, compat_pid_t pid, int sig, | |
1030 | - struct compat_siginfo __user *uinfo) | |
1031 | -{ | |
1032 | - siginfo_t info; | |
1033 | - | |
1034 | - if (copy_siginfo_from_user32(&info, uinfo)) | |
1035 | - return -EFAULT; | |
1036 | - return do_rt_tgsigqueueinfo(tgid, pid, sig, &info); | |
1037 | -} | |
1038 | - | |
1039 | 1028 | #ifdef __ARCH_WANT_COMPAT_SYS_TIME |
1040 | 1029 | |
1041 | 1030 | /* compat_time_t is a 32 bit "long" and needs to get converted. */ |
kernel/signal.c
... | ... | @@ -3030,7 +3030,7 @@ |
3030 | 3030 | #endif |
3031 | 3031 | #endif |
3032 | 3032 | |
3033 | -long do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, siginfo_t *info) | |
3033 | +static int do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, siginfo_t *info) | |
3034 | 3034 | { |
3035 | 3035 | /* This is only valid for single tasks */ |
3036 | 3036 | if (pid <= 0 || tgid <= 0) |
... | ... | @@ -3059,6 +3059,21 @@ |
3059 | 3059 | |
3060 | 3060 | return do_rt_tgsigqueueinfo(tgid, pid, sig, &info); |
3061 | 3061 | } |
3062 | + | |
3063 | +#ifdef CONFIG_COMPAT | |
3064 | +COMPAT_SYSCALL_DEFINE4(rt_tgsigqueueinfo, | |
3065 | + compat_pid_t, tgid, | |
3066 | + compat_pid_t, pid, | |
3067 | + int, sig, | |
3068 | + struct compat_siginfo __user *, uinfo) | |
3069 | +{ | |
3070 | + siginfo_t info; | |
3071 | + | |
3072 | + if (copy_siginfo_from_user32(&info, uinfo)) | |
3073 | + return -EFAULT; | |
3074 | + return do_rt_tgsigqueueinfo(tgid, pid, sig, &info); | |
3075 | +} | |
3076 | +#endif | |
3062 | 3077 | |
3063 | 3078 | int do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact) |
3064 | 3079 | { |