Skip to content

Commit

Permalink
HAVE_RESTORE_SIGMASK is defined on all architectures now
Browse files Browse the repository at this point in the history
Everyone either defines it in arch thread_info.h or has TIF_RESTORE_SIGMASK
and picks default set_restore_sigmask() in linux/thread_info.h.  Kill the
ifdefs, slap #error in linux/thread_info.h to catch breakage when new ones
get merged.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Jun 1, 2012
1 parent fb21aff commit 754421c
Showing 5 changed files with 4 additions and 14 deletions.
4 changes: 0 additions & 4 deletions fs/compat.c
Original file line number Diff line number Diff line change
@@ -1547,7 +1547,6 @@ asmlinkage long compat_sys_old_select(struct compat_sel_arg_struct __user *arg)
compat_ptr(a.exp), compat_ptr(a.tvp));
}

#ifdef HAVE_SET_RESTORE_SIGMASK
static long do_compat_pselect(int n, compat_ulong_t __user *inp,
compat_ulong_t __user *outp, compat_ulong_t __user *exp,
struct compat_timespec __user *tsp, compat_sigset_t __user *sigmask,
@@ -1670,11 +1669,9 @@ asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds,

return ret;
}
#endif /* HAVE_SET_RESTORE_SIGMASK */

#ifdef CONFIG_EPOLL

#ifdef HAVE_SET_RESTORE_SIGMASK
asmlinkage long compat_sys_epoll_pwait(int epfd,
struct compat_epoll_event __user *events,
int maxevents, int timeout,
@@ -1718,7 +1715,6 @@ asmlinkage long compat_sys_epoll_pwait(int epfd,

return err;
}
#endif /* HAVE_SET_RESTORE_SIGMASK */

#endif /* CONFIG_EPOLL */

4 changes: 0 additions & 4 deletions fs/eventpoll.c
Original file line number Diff line number Diff line change
@@ -1853,8 +1853,6 @@ SYSCALL_DEFINE4(epoll_wait, int, epfd, struct epoll_event __user *, events,
return error;
}

#ifdef HAVE_SET_RESTORE_SIGMASK

/*
* Implement the event wait interface for the eventpoll file. It is the kernel
* part of the user space epoll_pwait(2).
@@ -1899,8 +1897,6 @@ SYSCALL_DEFINE6(epoll_pwait, int, epfd, struct epoll_event __user *, events,
return error;
}

#endif /* HAVE_SET_RESTORE_SIGMASK */

static int __init eventpoll_init(void)
{
struct sysinfo si;
4 changes: 0 additions & 4 deletions fs/select.c
Original file line number Diff line number Diff line change
@@ -614,7 +614,6 @@ SYSCALL_DEFINE5(select, int, n, fd_set __user *, inp, fd_set __user *, outp,
return ret;
}

#ifdef HAVE_SET_RESTORE_SIGMASK
static long do_pselect(int n, fd_set __user *inp, fd_set __user *outp,
fd_set __user *exp, struct timespec __user *tsp,
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,

return do_pselect(n, inp, outp, exp, tsp, up, sigsetsize);
}
#endif /* HAVE_SET_RESTORE_SIGMASK */

#ifdef __ARCH_WANT_SYS_OLD_SELECT
struct sel_arg_struct {
@@ -941,7 +939,6 @@ SYSCALL_DEFINE3(poll, struct pollfd __user *, ufds, unsigned int, nfds,
return ret;
}

#ifdef HAVE_SET_RESTORE_SIGMASK
SYSCALL_DEFINE5(ppoll, struct pollfd __user *, ufds, unsigned int, nfds,
struct timespec __user *, tsp, const sigset_t __user *, sigmask,
size_t, sigsetsize)
@@ -992,4 +989,3 @@ SYSCALL_DEFINE5(ppoll, struct pollfd __user *, ufds, unsigned int, nfds,

return ret;
}
#endif /* HAVE_SET_RESTORE_SIGMASK */
4 changes: 4 additions & 0 deletions include/linux/thread_info.h
Original file line number Diff line number Diff line change
@@ -129,6 +129,10 @@ static inline void set_restore_sigmask(void)
}
#endif /* TIF_RESTORE_SIGMASK && !HAVE_SET_RESTORE_SIGMASK */

#ifndef HAVE_SET_RESTORE_SIGMASK
#error "no set_restore_sigmask() provided and default one won't work"
#endif

#endif /* __KERNEL__ */

#endif /* _LINUX_THREAD_INFO_H */
2 changes: 0 additions & 2 deletions kernel/signal.c
Original file line number Diff line number Diff line change
@@ -3235,7 +3235,6 @@ SYSCALL_DEFINE0(pause)

#endif

#ifdef HAVE_SET_RESTORE_SIGMASK
int sigsuspend(sigset_t *set)
{
sigdelsetmask(set, sigmask(SIGKILL)|sigmask(SIGSTOP));
@@ -3248,7 +3247,6 @@ int sigsuspend(sigset_t *set)
set_restore_sigmask();
return -ERESTARTNOHAND;
}
#endif

#ifdef __ARCH_WANT_SYS_RT_SIGSUSPEND
/**

0 comments on commit 754421c

Please sign in to comment.