diff options
| author | Dmitry V. Levin <ldv@altlinux.org> | 2017-08-21 19:16:11 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-09-19 17:55:54 -0400 |
| commit | f454322efbf6faee695f517c6b52c4dc03cacd3e (patch) | |
| tree | b1ecef65d6590d5f1421e1a4621a7e8ad3f24e6d /include/linux/compat.h | |
| parent | 2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e (diff) | |
signal: replace sigset_to_compat() with put_compat_sigset()
There are 4 callers of sigset_to_compat() in the entire kernel. One is
in sparc compat rt_sigaction(2), the rest are in kernel/signal.c itself.
All are followed by copy_to_user(), and all but the sparc one are under
"if it's big-endian..." ifdefs.
Let's transform sigset_to_compat() into put_compat_sigset() that also
calls copy_to_user().
Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/compat.h')
| -rw-r--r-- | include/linux/compat.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h index a5619de3437d..ab1baa79abe8 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
| @@ -456,7 +456,8 @@ asmlinkage long compat_sys_settimeofday(struct compat_timeval __user *tv, | |||
| 456 | asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp); | 456 | asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp); |
| 457 | 457 | ||
| 458 | extern void sigset_from_compat(sigset_t *set, const compat_sigset_t *compat); | 458 | extern void sigset_from_compat(sigset_t *set, const compat_sigset_t *compat); |
| 459 | extern void sigset_to_compat(compat_sigset_t *compat, const sigset_t *set); | 459 | extern int put_compat_sigset(compat_sigset_t __user *compat, |
| 460 | const sigset_t *set, unsigned int size); | ||
| 460 | 461 | ||
| 461 | asmlinkage long compat_sys_migrate_pages(compat_pid_t pid, | 462 | asmlinkage long compat_sys_migrate_pages(compat_pid_t pid, |
| 462 | compat_ulong_t maxnode, const compat_ulong_t __user *old_nodes, | 463 | compat_ulong_t maxnode, const compat_ulong_t __user *old_nodes, |
