aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/compat.c4
-rw-r--r--fs/eventpoll.c4
-rw-r--r--fs/select.c4
-rw-r--r--include/linux/thread_info.h4
-rw-r--r--kernel/signal.c2
5 files changed, 4 insertions, 14 deletions
diff --git a/fs/compat.c b/fs/compat.c
index 6556a9ce8a28..3adf3d4c2cd9 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -1547,7 +1547,6 @@ asmlinkage long compat_sys_old_select(struct compat_sel_arg_struct __user *arg)
1547 compat_ptr(a.exp), compat_ptr(a.tvp)); 1547 compat_ptr(a.exp), compat_ptr(a.tvp));
1548} 1548}
1549 1549
1550#ifdef HAVE_SET_RESTORE_SIGMASK
1551static long do_compat_pselect(int n, compat_ulong_t __user *inp, 1550static long do_compat_pselect(int n, compat_ulong_t __user *inp,
1552 compat_ulong_t __user *outp, compat_ulong_t __user *exp, 1551 compat_ulong_t __user *outp, compat_ulong_t __user *exp,
1553 struct compat_timespec __user *tsp, compat_sigset_t __user *sigmask, 1552 struct compat_timespec __user *tsp, compat_sigset_t __user *sigmask,
@@ -1670,11 +1669,9 @@ asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds,
1670 1669
1671 return ret; 1670 return ret;
1672} 1671}
1673#endif /* HAVE_SET_RESTORE_SIGMASK */
1674 1672
1675#ifdef CONFIG_EPOLL 1673#ifdef CONFIG_EPOLL
1676 1674
1677#ifdef HAVE_SET_RESTORE_SIGMASK
1678asmlinkage long compat_sys_epoll_pwait(int epfd, 1675asmlinkage long compat_sys_epoll_pwait(int epfd,
1679 struct compat_epoll_event __user *events, 1676 struct compat_epoll_event __user *events,
1680 int maxevents, int timeout, 1677 int maxevents, int timeout,
@@ -1718,7 +1715,6 @@ asmlinkage long compat_sys_epoll_pwait(int epfd,
1718 1715
1719 return err; 1716 return err;
1720} 1717}
1721#endif /* HAVE_SET_RESTORE_SIGMASK */
1722 1718
1723#endif /* CONFIG_EPOLL */ 1719#endif /* CONFIG_EPOLL */
1724 1720
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 079d1be65ba9..74598f67efeb 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -1853,8 +1853,6 @@ error_return:
1853 return error; 1853 return error;
1854} 1854}
1855 1855
1856#ifdef HAVE_SET_RESTORE_SIGMASK
1857
1858/* 1856/*
1859 * Implement the event wait interface for the eventpoll file. It is the kernel 1857 * Implement the event wait interface for the eventpoll file. It is the kernel
1860 * part of the user space epoll_pwait(2). 1858 * part of the user space epoll_pwait(2).
@@ -1899,8 +1897,6 @@ SYSCALL_DEFINE6(epoll_pwait, int, epfd, struct epoll_event __user *, events,
1899 return error; 1897 return error;
1900} 1898}
1901 1899
1902#endif /* HAVE_SET_RESTORE_SIGMASK */
1903
1904static int __init eventpoll_init(void) 1900static int __init eventpoll_init(void)
1905{ 1901{
1906 struct sysinfo si; 1902 struct sysinfo si;
diff --git a/fs/select.c b/fs/select.c
index 17d33d09fc16..bae321569dfa 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -614,7 +614,6 @@ SYSCALL_DEFINE5(select, int, n, fd_set __user *, inp, fd_set __user *, outp,
614 return ret; 614 return ret;
615} 615}
616 616
617#ifdef HAVE_SET_RESTORE_SIGMASK
618static long do_pselect(int n, fd_set __user *inp, fd_set __user *outp, 617static long do_pselect(int n, fd_set __user *inp, fd_set __user *outp,
619 fd_set __user *exp, struct timespec __user *tsp, 618 fd_set __user *exp, struct timespec __user *tsp,
620 const sigset_t __user *sigmask, size_t sigsetsize) 619 const sigset_t __user *sigmask, size_t sigsetsize)
@@ -686,7 +685,6 @@ SYSCALL_DEFINE6(pselect6, int, n, fd_set __user *, inp, fd_set __user *, outp,
686 685
687 return do_pselect(n, inp, outp, exp, tsp, up, sigsetsize); 686 return do_pselect(n, inp, outp, exp, tsp, up, sigsetsize);
688} 687}
689#endif /* HAVE_SET_RESTORE_SIGMASK */
690 688
691#ifdef __ARCH_WANT_SYS_OLD_SELECT 689#ifdef __ARCH_WANT_SYS_OLD_SELECT
692struct sel_arg_struct { 690struct sel_arg_struct {
@@ -941,7 +939,6 @@ SYSCALL_DEFINE3(poll, struct pollfd __user *, ufds, unsigned int, nfds,
941 return ret; 939 return ret;
942} 940}
943 941
944#ifdef HAVE_SET_RESTORE_SIGMASK
945SYSCALL_DEFINE5(ppoll, struct pollfd __user *, ufds, unsigned int, nfds, 942SYSCALL_DEFINE5(ppoll, struct pollfd __user *, ufds, unsigned int, nfds,
946 struct timespec __user *, tsp, const sigset_t __user *, sigmask, 943 struct timespec __user *, tsp, const sigset_t __user *, sigmask,
947 size_t, sigsetsize) 944 size_t, sigsetsize)
@@ -992,4 +989,3 @@ SYSCALL_DEFINE5(ppoll, struct pollfd __user *, ufds, unsigned int, nfds,
992 989
993 return ret; 990 return ret;
994} 991}
995#endif /* HAVE_SET_RESTORE_SIGMASK */
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h
index db78775eff3b..eee729428683 100644
--- a/include/linux/thread_info.h
+++ b/include/linux/thread_info.h
@@ -129,6 +129,10 @@ static inline void set_restore_sigmask(void)
129} 129}
130#endif /* TIF_RESTORE_SIGMASK && !HAVE_SET_RESTORE_SIGMASK */ 130#endif /* TIF_RESTORE_SIGMASK && !HAVE_SET_RESTORE_SIGMASK */
131 131
132#ifndef HAVE_SET_RESTORE_SIGMASK
133#error "no set_restore_sigmask() provided and default one won't work"
134#endif
135
132#endif /* __KERNEL__ */ 136#endif /* __KERNEL__ */
133 137
134#endif /* _LINUX_THREAD_INFO_H */ 138#endif /* _LINUX_THREAD_INFO_H */
diff --git a/kernel/signal.c b/kernel/signal.c
index 08dfbd748cd2..95a9d9d8122b 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -3235,7 +3235,6 @@ SYSCALL_DEFINE0(pause)
3235 3235
3236#endif 3236#endif
3237 3237
3238#ifdef HAVE_SET_RESTORE_SIGMASK
3239int sigsuspend(sigset_t *set) 3238int sigsuspend(sigset_t *set)
3240{ 3239{
3241 sigdelsetmask(set, sigmask(SIGKILL)|sigmask(SIGSTOP)); 3240 sigdelsetmask(set, sigmask(SIGKILL)|sigmask(SIGSTOP));
@@ -3248,7 +3247,6 @@ int sigsuspend(sigset_t *set)
3248 set_restore_sigmask(); 3247 set_restore_sigmask();
3249 return -ERESTARTNOHAND; 3248 return -ERESTARTNOHAND;
3250} 3249}
3251#endif
3252 3250
3253#ifdef __ARCH_WANT_SYS_RT_SIGSUSPEND 3251#ifdef __ARCH_WANT_SYS_RT_SIGSUSPEND
3254/** 3252/**